Functions | |
void | platform_cmd_cmpl_signal (void) |
fires the command-complete signal More... | |
at_ble_status_t | platform_cmd_cmpl_wait (void) |
blocks until the command-complete signal is fired More... | |
void | platform_event_signal (void) |
fires the event signal More... | |
at_ble_status_t | platform_event_wait (uint32_t timeout) |
blocks until the event signal is fired More... | |
at_ble_status_t | platform_init (plf_params_t *platform_params) |
implements platform-specific initialization More... | |
void | platform_interface_callback (uint8_t *data, uint32_t len) |
the callback to upper layers to process received packets More... | |
at_ble_status_t | platform_interface_send (uint8_t *data, uint32_t len) |
sends a message over the platform-specific bus More... | |
void | platform_receive (uint8_t *data, uint32_t len) |
void | platform_set_timeout (uint32_t timeout) |
set timeout value used for wait functions. More... | |
void platform_cmd_cmpl_signal | ( | void | ) |
fires the command-complete signal
References cmd_cmpl_flag.
Referenced by special_events_handler().
at_ble_status_t platform_cmd_cmpl_wait | ( | void | ) |
blocks until the command-complete signal is fired
References AT_BLE_FAILURE, AT_BLE_SUCCESS, cmd_cmpl_flag, gu32Jiffies1ms, gu32Timeout, and plf_params_t::plf_wait_cb.
Referenced by interface_send_wait().
void platform_event_signal | ( | void | ) |
fires the event signal
References event_flag.
Referenced by event_post().
at_ble_status_t platform_event_wait | ( | uint32_t | timeout | ) |
blocks until the event signal is fired
[in] | timeout | timeout in ms passed by user |
References AT_BLE_SUCCESS, AT_BLE_TIMEOUT, event_flag, gu32Jiffies1ms, plf_params_t::plf_wait_cb, and status.
Referenced by event_get().
at_ble_status_t platform_init | ( | plf_params_t * | platform_params | ) |
implements platform-specific initialization
[in] | platform_params | platform specific params, this pointer is passed from the at_ble_init function and interpreted by the platform |
References AT_BLE_FW_INCOMPAT, AT_BLE_SUCCESS, plf_params_t::ble_write_cb, plf_params_t::fw_ver, plf_params_t::fw_version::major, MINIMUM_FW_MAJ, MINIMUM_FW_MIN, MINIMUM_FW_PATCH, plf_params_t::fw_version::minor, plf_params_t::mv, plf_params_t::fw_version::patch, plf_params_t::plf_wait_cb, and VERSION_FIELD_VALID.
Referenced by at_ble_init().
void platform_interface_callback | ( | uint8_t * | data, |
uint32_t | len | ||
) |
the callback to upper layers to process received packets
This function is implemented by the upper layers (the event loop) and it is up to the platform implementation to call it whenever data are received from the interface
[in] | data | data received from the interface |
[in] | len | length of data |
References event_post(), header, INTERFACE_API_PKT_ID, INTERFACE_HDR_LENGTH, INTERFACE_RCV_BUFF_LEN, INTERFACE_UNPACK_DONE, INTERFACE_UNPACK_INIT, INTERFACE_UNPACK_SKIP, INTERFACE_UNPACK_UINT16, NMI_BLE_COLLECTING_HDR, NMI_BLE_COLLECTING_PAYLOAD, NMI_BLE_WAITING, NULL, special_events_handler(), and state.
Referenced by platform_receive().
at_ble_status_t platform_interface_send | ( | uint8_t * | data, |
uint32_t | len | ||
) |
sends a message over the platform-specific bus
Sends a message over the platform-specific bus that might be UART, SPI or other if the BTLC1000 external wakeup signal is used, it is up to this function implementation to assert/deassert it appropriately
[in] | data | data to send over the interface |
[in] | len | length of data |
References AT_BLE_FAILURE, AT_BLE_SUCCESS, and plf_params_t::ble_write_cb.
Referenced by interface_send().
void platform_receive | ( | uint8_t * | data, |
uint32_t | len | ||
) |
References platform_interface_callback().
Referenced by m2m_ble_wifi_callback().
void platform_set_timeout | ( | uint32_t | timeout | ) |
set timeout value used for wait functions.
[in] | timeout | timeout in ms passed by user |
References gu32Timeout.