gr55xx_lcp.h
Go to the documentation of this file.
1
50 #ifndef _GR55XX_LCP_H_
51 #define _GR55XX_LCP_H_
52
53
57 typedef uint16_t (*rx_handler_cb_t) (uint8_t header, uint8_t length, uint8_t *p_payload);
63 enum PROTOCOL_MODE
64 {
65 BLE_ADV,
66 BLE_SCAN,
67 LCP_TX,
68 LCP_RX,
69 };
75 typedef struct
76 {
77 uint8_t mode;
78 int8_t txpwr_dbm;
79 uint8_t ch_idx;
80 uint32_t freq;
81 uint32_t access_address;
82 uint32_t crc_init;
83 rx_handler_cb_t rx_handler_cb;
84 } gdx_lcp_config_t;
100 uint16_t gdx_lcp_init(gdx_lcp_config_t *gdx_lcp_config);
101
109 uint16_t gdx_lcp_deinit(void);
110
121 uint16_t gdx_lcp_tx_power_set(int8_t txpwr_dbm);
122
133 uint16_t gdx_lcp_tx_power_get(int8_t *txpwr_dbm);
134
146 uint16_t gdx_lcp_channel_set(uint32_t freq, uint8_t ch_idx);
147
159 uint16_t gdx_lcp_channel_get(uint32_t *freq, uint8_t *ch_idx);
160
173 uint16_t gdx_lcp_data_tx(uint8_t header, uint8_t length, uint8_t *p_payload);
174
182 uint16_t gdx_lcp_rx_start(void);
183
191 uint16_t gdx_lcp_rx_stop(void);
192
195 #endif
196
LCP_TX
@ LCP_TX
Definition: gr55xx_lcp.h:67
gdx_lcp_init
uint16_t gdx_lcp_init(gdx_lcp_config_t *gdx_lcp_config)
Initialize LCP.
PROTOCOL_MODE
PROTOCOL_MODE
Protocol Mode.
Definition: lcp_sdk.h:64
gdx_lcp_config_t
LCP Parameter.
Definition: lcp_sdk.h:76
gdx_lcp_tx_power_set
uint16_t gdx_lcp_tx_power_set(int8_t txpwr_dbm)
Set the tx power of LCP.
gdx_lcp_rx_stop
uint16_t gdx_lcp_rx_stop(void)
Stop receiving packets.
gdx_lcp_data_tx
uint16_t gdx_lcp_data_tx(uint8_t header, uint8_t length, uint8_t *p_payload)
Transmmit a packet.
rx_handler_cb_t
uint16_t(* rx_handler_cb_t)(uint8_t header, uint8_t length, uint8_t *p_payload)
RX handler callback function.
Definition: gr55xx_lcp.h:57
gdx_lcp_tx_power_get
uint16_t gdx_lcp_tx_power_get(int8_t *txpwr_dbm)
Get the tx power of LCP.
gdx_lcp_rx_start
uint16_t gdx_lcp_rx_start(void)
Start receiving packets.
gdx_lcp_channel_set
uint16_t gdx_lcp_channel_set(uint32_t freq, uint8_t ch_idx)
Set the channel of LCP.
LCP_RX
@ LCP_RX
Definition: gr55xx_lcp.h:68
BLE_ADV
@ BLE_ADV
Definition: gr55xx_lcp.h:65
gdx_lcp_deinit
uint16_t gdx_lcp_deinit(void)
Deinitialize LCP.
BLE_SCAN
@ BLE_SCAN
Definition: gr55xx_lcp.h:66
gdx_lcp_channel_get
uint16_t gdx_lcp_channel_get(uint32_t *freq, uint8_t *ch_idx)
Get the channel of LCP.