InPlay API
|
HAL_IPMAC. More...
Data Structures | |
struct | ipmac_init_t |
Initialization parameters for ipmac. More... | |
struct | ipmac_mst_cb_t |
Master callback parameter. More... | |
struct | ipmac_slv_cb_t |
Slave callback parameter. More... | |
struct | ipmac_mst_tx_t |
Master TX parameter. More... | |
struct | ipmac_mst_prio_tx_t |
Master priority TX parameter. More... | |
struct | ipmac_slv_tx_t |
Slave TX parameter. More... | |
struct | ipmac_slv_prio_tx_t |
Slave priority TX parameter. More... | |
struct | ipmac_queue_t |
Queue configuration parameter. More... | |
struct | ipmac_freq_tab_t |
Frequence table parameter. More... | |
struct | ipmac_update_remote_t |
Update remote deivce parameter. More... | |
struct | ipmac_mst_update_cfg_t |
Master update configration parameter. More... | |
struct | ipmac_slv_update_cfg_t |
Slave update configration parameter. More... | |
Functions | |
ipmac_dev_t * | hal_ipmac_open (ipmac_init_t *para) |
Open HAL IPMAC driver. More... | |
void | hal_ipmac_close (ipmac_dev_t *pd) |
Close HAL IPMAC driver. More... | |
int | hal_ipmac_mst_cfg (ipmac_dev_t *pd, ipmac_offset_param_t *offset) |
Config master device. More... | |
int | hal_ipmac_slv_cfg (ipmac_dev_t *pd, int slv_id, ipmac_offset_param_t *offset) |
Config slave device. More... | |
int | hal_ipmac_set_freq_table (ipmac_dev_t *pd, ipmac_freq_tab_t *tab) |
Set frequency table. More... | |
int | hal_ipmac_mst_start (ipmac_dev_t *pd) |
Start master device. More... | |
int | hal_ipmac_slv_start (ipmac_dev_t *pd) |
Start slave device. More... | |
int | hal_ipmac_mst_tx (ipmac_dev_t *pd, ipmac_mst_tx_t *para) |
Send packet from master device. More... | |
int | hal_ipmac_slv_tx (ipmac_dev_t *pd, ipmac_slv_tx_t *para) |
Send packet from slave device. More... | |
int | hal_ipmac_mst_udpate_remote_offset (ipmac_dev_t *pd, ipmac_update_remote_t *update) |
Master udpate slave offset parameter. More... | |
int | hal_ipmac_mst_stop (ipmac_dev_t *pd) |
Stop master device. More... | |
int | hal_ipmac_mst_set_cb (ipmac_dev_t *pd, ipmac_mst_cb_t *cb) |
Set master callback. More... | |
int | hal_ipmac_slv_set_cb (ipmac_dev_t *pd, ipmac_slv_cb_t *cb) |
Set slave callback. More... | |
int | hal_ipmac_slv_stop (ipmac_dev_t *pd) |
Stop slave device. More... | |
int | hal_ipmac_slv_en_queue (ipmac_dev_t *pd, ipmac_queue_t *para) |
Slave enable queue. More... | |
int | hal_ipmac_slv_dis_queue (ipmac_dev_t *pd) |
Slave disable queue. More... | |
int | hal_ipmac_mst_en_queue (ipmac_dev_t *pd, int slv_id, ipmac_queue_t *para) |
Master enable queue. More... | |
int | hal_ipmac_mst_dis_queue (ipmac_dev_t *pd, int slv_id) |
Master disable queue. More... | |
int | hal_ipmac_mst_ota_tx (ipmac_dev_t *pd, ipmac_mst_tx_t *para) |
Master send OTA data. More... | |
int | hal_ipmac_bc_int_set (ipmac_dev_t *pd, uint8_t *data, uint16_t len) |
udpate internal buffer of broadcast pdu, normally, is using to hopping application. More... | |
int | hal_ipmac_set_bc_buf (ipmac_dev_t *pd, uint8_t *buf, uint16_t max_len) |
set bc buffer and maximum length More... | |
int | hal_ipmac_mst_bc_cont_tx (ipmac_dev_t *pd, uint8_t *buffer, uint16_t buffer_len) |
update broadcast pdu buffer, and tx in every frame. need firstly call More... | |
int | hal_ipmac_slv_status (ipmac_dev_t *pd) |
Get current status of the slave. More... | |
uint32_t | hal_ipmac_frame_time (ipmac_dev_t *pd) |
Get the real time of the superframe. More... | |
int16_t | get_rssi (void) |
Get RSSI. More... | |
uint32_t | hal_ipmac_convert_sf_timestamp (ipmac_dev_t *pd, uint32_t sf_reg) |
Convert the super frame counter into time. Before successfully using this API, you should do the following two steps at first. More... | |
int | hal_ipmac_enable_intr (ipmac_dev_t *pd, uint32_t intr_src) |
Enable interrupt. More... | |
int | hal_ipmac_disable_intr (ipmac_dev_t *pd, uint32_t intr_src) |
Disable Interrupt. More... | |
int | hal_ipmac_set_sync (ipmac_dev_t *pd, uint8_t addr_idx, uint32_t address) |
set SYNC word, 4 different SYNC words can be configured. More... | |
int | hal_ipmac_set_resp_sync (ipmac_dev_t *pd, uint8_t addr_idx, uint32_t address) |
set response SYNC word More... | |
int | hal_ipmac_sync_sel (ipmac_dev_t *pd, uint8_t addr_idx, uint8_t sf_idx) |
Select the SYNC word for the superframe. More... | |
int | hal_ipmac_resp_sync_sel (ipmac_dev_t *pd, uint8_t addr_idx, uint8_t sf_idx) |
Select the response SYNC word for the superframe. More... | |
int | hal_ipmac_sync_sel_clear (ipmac_dev_t *pd) |
The default SYNC word is used for all superframes. More... | |
int | hal_ipmac_resp_sync_sel_clear (ipmac_dev_t *pd) |
The default response SYNC word is used for all superframes. More... | |
HAL_IPMAC.
int16_t get_rssi | ( | void | ) |
Get RSSI.
int hal_ipmac_bc_int_set | ( | ipmac_dev_t * | pd, |
uint8_t * | data, | ||
uint16_t | len | ||
) |
udpate internal buffer of broadcast pdu, normally, is using to hopping application.
pd | Device handle. |
data | buffer data |
len | buffer length |
void hal_ipmac_close | ( | ipmac_dev_t * | pd | ) |
Close HAL IPMAC driver.
[in] | pd | Device handle. |
uint32_t hal_ipmac_convert_sf_timestamp | ( | ipmac_dev_t * | pd, |
uint32_t | sf_reg | ||
) |
Convert the super frame counter into time. Before successfully using this API, you should do the following two steps at first.
[in] | pd | Device handle. |
[in] | sf_reg | Read from super frame counter register |
int hal_ipmac_disable_intr | ( | ipmac_dev_t * | pd, |
uint32_t | intr_src | ||
) |
Disable Interrupt.
[in] | pd | Device handle. |
[in] | intr_src | interrupt source |
int hal_ipmac_enable_intr | ( | ipmac_dev_t * | pd, |
uint32_t | intr_src | ||
) |
Enable interrupt.
[in] | pd | Device handle. |
[in] | intr_src | interrupt source |
uint32_t hal_ipmac_frame_time | ( | ipmac_dev_t * | pd | ) |
Get the real time of the superframe.
[in] | pd | Device handle. |
int hal_ipmac_mst_bc_cont_tx | ( | ipmac_dev_t * | pd, |
uint8_t * | buffer, | ||
uint16_t | buffer_len | ||
) |
update broadcast pdu buffer, and tx in every frame. need firstly call
pd | |
buffer | data's buffer, null will disable cont_tx |
buffer_len | length of the data, 0 will disable cont_tx |
int hal_ipmac_mst_cfg | ( | ipmac_dev_t * | pd, |
ipmac_offset_param_t * | offset | ||
) |
Config master device.
[in] | pd | Device handle. |
[in] | offset | Config parameter, ipmac_offset_param_t |
int hal_ipmac_mst_dis_queue | ( | ipmac_dev_t * | pd, |
int | slv_id | ||
) |
Master disable queue.
[in] | pd | Device handle. |
[in] | slv_id | Slave id |
int hal_ipmac_mst_en_queue | ( | ipmac_dev_t * | pd, |
int | slv_id, | ||
ipmac_queue_t * | para | ||
) |
Master enable queue.
[in] | pd | Device handle. |
[in] | slv_id | Slave id |
[in] | para | ipmac_queue_t |
int hal_ipmac_mst_ota_tx | ( | ipmac_dev_t * | pd, |
ipmac_mst_tx_t * | para | ||
) |
Master send OTA data.
[in] | pd | Device handle. |
[in] | para | ipmac_mst_tx_t |
int hal_ipmac_mst_set_cb | ( | ipmac_dev_t * | pd, |
ipmac_mst_cb_t * | cb | ||
) |
Set master callback.
pd | Device handle. |
cb | callback |
int hal_ipmac_mst_start | ( | ipmac_dev_t * | pd | ) |
Start master device.
[in] | pd | Device handle. |
int hal_ipmac_mst_stop | ( | ipmac_dev_t * | pd | ) |
Stop master device.
[in] | pd | Device handle. |
int hal_ipmac_mst_tx | ( | ipmac_dev_t * | pd, |
ipmac_mst_tx_t * | para | ||
) |
Send packet from master device.
[in] | pd | Device handle. |
[in] | para | tx parameter. enum ipmac_mst_tx_t |
int hal_ipmac_mst_udpate_remote_offset | ( | ipmac_dev_t * | pd, |
ipmac_update_remote_t * | update | ||
) |
Master udpate slave offset parameter.
[in] | pd | Device handle. |
[in] | update | enum ipmac_update_remote_t |
ipmac_dev_t* hal_ipmac_open | ( | ipmac_init_t * | para | ) |
Open HAL IPMAC driver.
[in] | para | Open parameter, ipmac_init_t |
int hal_ipmac_resp_sync_sel | ( | ipmac_dev_t * | pd, |
uint8_t | addr_idx, | ||
uint8_t | sf_idx | ||
) |
Select the response SYNC word for the superframe.
[in] | pd | Device handle. |
[in] | addr_idx | one of the 4 response SYNC words (0 - 3) |
[in] | sf_idx | index in the superframes (0-63) |
int hal_ipmac_resp_sync_sel_clear | ( | ipmac_dev_t * | pd | ) |
The default response SYNC word is used for all superframes.
[in] | pd | Device handle. |
int hal_ipmac_set_bc_buf | ( | ipmac_dev_t * | pd, |
uint8_t * | buf, | ||
uint16_t | max_len | ||
) |
set bc buffer and maximum length
pd | Device handle. |
buf | buffer data |
max_len | max buffer length |
int hal_ipmac_set_freq_table | ( | ipmac_dev_t * | pd, |
ipmac_freq_tab_t * | tab | ||
) |
Set frequency table.
[in] | pd | Device handle. |
[in] | tab | ipmac_freq_tab_t |
int hal_ipmac_set_resp_sync | ( | ipmac_dev_t * | pd, |
uint8_t | addr_idx, | ||
uint32_t | address | ||
) |
set response SYNC word
[in] | pd | Device handle. |
[in] | addr_idx | one of the 4 response SYNC words (0 - 3) |
[in] | address | a 32-bit number |
int hal_ipmac_set_sync | ( | ipmac_dev_t * | pd, |
uint8_t | addr_idx, | ||
uint32_t | address | ||
) |
set SYNC word, 4 different SYNC words can be configured.
[in] | pd | Device handle. |
[in] | addr_idx | one of the 4 SYNC words (0 - 3) |
[in] | address | a 32-bit number |
int hal_ipmac_slv_cfg | ( | ipmac_dev_t * | pd, |
int | slv_id, | ||
ipmac_offset_param_t * | offset | ||
) |
Config slave device.
[in] | pd | Device handle. |
[in] | slv_id | Slave id |
[in] | offset | Config parameter, ipmac_offset_param_t |
int hal_ipmac_slv_dis_queue | ( | ipmac_dev_t * | pd | ) |
Slave disable queue.
[in] | pd | Device handle. |
int hal_ipmac_slv_en_queue | ( | ipmac_dev_t * | pd, |
ipmac_queue_t * | para | ||
) |
Slave enable queue.
[in] | pd | Device handle. |
[in] | para | ipmac_queue_t |
int hal_ipmac_slv_set_cb | ( | ipmac_dev_t * | pd, |
ipmac_slv_cb_t * | cb | ||
) |
Set slave callback.
pd | Device handle. |
cb | callback |
int hal_ipmac_slv_start | ( | ipmac_dev_t * | pd | ) |
Start slave device.
[in] | pd | Device handle. |
int hal_ipmac_slv_status | ( | ipmac_dev_t * | pd | ) |
Get current status of the slave.
[in] | pd | Device handle. |
int hal_ipmac_slv_stop | ( | ipmac_dev_t * | pd | ) |
Stop slave device.
[in] | pd | Device handle. |
int hal_ipmac_slv_tx | ( | ipmac_dev_t * | pd, |
ipmac_slv_tx_t * | para | ||
) |
Send packet from slave device.
[in] | pd | Device handle. |
[in] | para | enum ipmac_slv_tx_t |
int hal_ipmac_sync_sel | ( | ipmac_dev_t * | pd, |
uint8_t | addr_idx, | ||
uint8_t | sf_idx | ||
) |
Select the SYNC word for the superframe.
[in] | pd | Device handle. |
[in] | addr_idx | one of the 4 SYNC words (0 - 3) |
[in] | sf_idx | index in the superframes (0-63) |
int hal_ipmac_sync_sel_clear | ( | ipmac_dev_t * | pd | ) |
The default SYNC word is used for all superframes.
[in] | pd | Device handle. |