bm78  2.1.0.0
Data Structures | Macros | Enumerations | Functions
bm78.h File Reference

This file contains API for BM78 Click Driver. More...

#include "drv_digital_out.h"
#include "drv_digital_in.h"
#include "drv_uart.h"
#include "bm78_config.h"

Go to the source code of this file.

Data Structures

struct  bm78_t
 BM78 Click context object. More...
 
struct  bm78_cfg_t
 BM78 Click configuration object. More...
 

Macros

#define BM78_HCI_COMMAND_PACKET   0x01
 BM78 HCI Packet Type commands. More...
 
#define BM78_HCI_ACL_DATA_PACKET   0x02
 
#define BM78_HCI_SYNCHRONOUS_DATA_PACKET   0x03
 
#define BM78_HCI_EVENT_PACKET   0x04
 
#define BM78_HCI_ISO_DATA_PACKET   0x05
 
#define BM78_HCI_COMMAND_COMPLETE   0x0E
 
#define BM78_HCI_COMMAND_IND_SUCCESS   0x00
 
#define BM78_PAGE_WRITE_NUMBER   0x08
 BM78 page write number. More...
 
#define BM78_PIN_STATE_HIGH   0x01
 BM78 pin state settings. More...
 
#define BM78_PIN_STATE_LOW   0x00
 
#define BM78_OPCODE_RESET_CMD   0x030C
 BM78 HCI commands. More...
 
#define BM78_HCI_EEPROM_WR_PG_NUM_CMD   0x2DFC
 
#define BM78_HCI_EEPROM_WRITE_CMD   0x27FC
 
#define BM78_HCI_EEPROM_READ_CMD   0x29FC
 
#define BM78_TX_DRV_BUFFER_SIZE   100
 BM78 driver buffer size. More...
 
#define BM78_RX_DRV_BUFFER_SIZE   300
 
#define BM78_MAP_MIKROBUS(cfg, mikrobus)
 MikroBUS pin mapping. More...
 

Enumerations

enum  bm78_return_value_t { BM78_OK = 0, BM78_ERROR = -1 }
 BM78 Click return value data. More...
 

Functions

void bm78_cfg_setup (bm78_cfg_t *cfg)
 BM78 configuration object setup function. More...
 
err_t bm78_init (bm78_t *ctx, bm78_cfg_t *cfg)
 BM78 initialization function. More...
 
err_t bm78_generic_write (bm78_t *ctx, uint8_t *data_in, uint16_t len)
 BM78 data writing function. More...
 
err_t bm78_generic_read (bm78_t *ctx, uint8_t *data_out, uint16_t len)
 BM78 data reading function. More...
 
void bm78_set_rst_pin (bm78_t *ctx, uint8_t pin_state)
 BM78 set RST pin function. More...
 
void bm78_set_cts_pin (bm78_t *ctx, uint8_t pin_state)
 BM78 set CTS pin function. More...
 
uint8_t bm78_get_st1_pin (bm78_t *ctx)
 BM78 get ST1 pin function. More...
 
uint8_t bm78_get_st2_pin (bm78_t *ctx)
 BM78 get ST2 pin function. More...
 
uint8_t bm78_get_rts_pin (bm78_t *ctx)
 BM78 get RTS pin function. More...
 
void bm78_hw_reset (bm78_t *ctx)
 BM78 Hardware reset function. More...
 
err_t bm78_eeprom_send_cmd (bm78_t *ctx, uint16_t op_code, uint8_t *param, uint8_t len)
 BM78 EEPROM send command function. More...
 
err_t bm78_eeprom_get_event (bm78_t *ctx, uint8_t *ev_type, uint8_t *len, uint8_t *data_rx)
 BM78 EEPROM get event function. More...
 
err_t bm78_reset_cmd (bm78_t *ctx)
 BM78 reset function. More...
 
err_t bm78_eeprom_write_number (bm78_t *ctx)
 BM78 write EEPROM number function. More...
 
err_t bm78_eeprom_write (bm78_t *ctx, uint16_t address, uint8_t *data_in, uint8_t len)
 BM78 EEPROM write function. More...
 
err_t bm78_eeprom_read (bm78_t *ctx, uint16_t address, uint8_t *data_out, uint8_t len)
 BM78 EEPROM read function. More...
 
err_t bm78_flash_eeprom (bm78_t *ctx)
 BM78 EEPROM flash function. More...
 

Detailed Description

This file contains API for BM78 Click Driver.

Enumeration Type Documentation

◆ bm78_return_value_t

BM78 Click return value data.

Predefined enum values for driver return values.

Enumerator
BM78_OK 
BM78_ERROR