LibDriver BPC
Loading...
Searching...
No Matches
bpc basic driver function

bpc basic driver modules More...

Collaboration diagram for bpc basic driver function:

Data Structures

struct  bpc_s
 bpc structure definition More...
struct  bpc_time_s
 bpc time structure definition More...
struct  bpc_decode_s
 bpc decode structure definition More...
struct  bpc_handle_s
 bpc handle structure definition More...
struct  bpc_info_s
 bpc information structure definition More...

Macros

#define BPC_MAX_START_RANGE   0.20f
 bpc max start range definition
#define BPC_MAX_RANGE   0.20f
 bpc max range definition

Typedefs

typedef struct bpc_s bpc_t
 bpc structure definition
typedef struct bpc_time_s bpc_time_t
 bpc time structure definition
typedef struct bpc_decode_s bpc_decode_t
 bpc decode structure definition
typedef struct bpc_handle_s bpc_handle_t
 bpc handle structure definition
typedef struct bpc_info_s bpc_info_t
 bpc information structure definition

Enumerations

enum  bpc_status_t { BPC_STATUS_OK = 0x00 , BPC_STATUS_PARITY_ERR = 0x01 , BPC_STATUS_FRAME_INVALID = 0x02 }
 bpc status enumeration definition More...

Functions

uint8_t bpc_info (bpc_info_t *info)
 get chip's information
uint8_t bpc_irq_handler (bpc_handle_t *handle)
 irq handler
uint8_t bpc_init (bpc_handle_t *handle)
 initialize the chip
uint8_t bpc_deinit (bpc_handle_t *handle)
 close the chip

Detailed Description

bpc basic driver modules

Macro Definition Documentation

◆ BPC_MAX_RANGE

#define BPC_MAX_RANGE   0.20f

bpc max range definition

20%

Definition at line 70 of file driver_bpc.h.

◆ BPC_MAX_START_RANGE

#define BPC_MAX_START_RANGE   0.20f

bpc max start range definition

20%

Definition at line 63 of file driver_bpc.h.

Typedef Documentation

◆ bpc_decode_t

typedef struct bpc_decode_s bpc_decode_t

bpc decode structure definition

◆ bpc_handle_t

typedef struct bpc_handle_s bpc_handle_t

bpc handle structure definition

◆ bpc_info_t

typedef struct bpc_info_s bpc_info_t

bpc information structure definition

◆ bpc_t

typedef struct bpc_s bpc_t

bpc structure definition

◆ bpc_time_t

typedef struct bpc_time_s bpc_time_t

bpc time structure definition

Enumeration Type Documentation

◆ bpc_status_t

bpc status enumeration definition

Enumerator
BPC_STATUS_OK 

ok

BPC_STATUS_PARITY_ERR 

parity error

BPC_STATUS_FRAME_INVALID 

frame invalid

Definition at line 76 of file driver_bpc.h.

Function Documentation

◆ bpc_deinit()

uint8_t bpc_deinit ( bpc_handle_t * handle)

close the chip

Parameters
[in]*handlepointer to a bpc handle structure
Returns
status code
  • 0 success
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 1257 of file driver_bpc.c.

◆ bpc_info()

uint8_t bpc_info ( bpc_info_t * info)

get chip's information

Parameters
[out]*infopointer to a bpc info structure
Returns
status code
  • 0 success
  • 2 handle is NULL
Note
none

Definition at line 1281 of file driver_bpc.c.

◆ bpc_init()

uint8_t bpc_init ( bpc_handle_t * handle)

initialize the chip

Parameters
[in]*handlepointer to a bpc handle structure
Returns
status code
  • 0 success
  • 1 gpio initialization failed
  • 2 handle is NULL
  • 3 linked functions is NULL
Note
none

Definition at line 1198 of file driver_bpc.c.

◆ bpc_irq_handler()

uint8_t bpc_irq_handler ( bpc_handle_t * handle)

irq handler

Parameters
[in]*handlepointer to a bpc handle structure
Returns
status code
  • 0 success
  • 1 run failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 1124 of file driver_bpc.c.