Rtos API example
serial_mac_api.h File Reference
Serial MAC API. More...
Go to the source code of this file.
Data Structures | |
struct | serial_mac_api_s |
Serial MAC callback structure. More... | |
Typedefs | |
typedef int8_t | data_request (const serial_mac_api_t *api, const uint8_t *data_ptr, uint16_t data_length) |
data_request data request call | |
typedef void | data_indication (const serial_mac_api_t *api, const uint8_t *data_ptr, uint16_t data_length) |
data_indication Data indication is called when MAC layer has received data | |
typedef int8_t | serial_mac_api_initialize (serial_mac_api_t *api, data_indication *ind_cb) |
* | |
typedef int8_t | serial_mac_virtual_initialize (const serial_mac_api_t *api, int8_t driver_id) |
serial_mac_virtual_initialize Initialises MAC to use virtual driver | |
Functions | |
serial_mac_api_t * | serial_mac_create (int8_t serial_driver_id) |
Create serial MAC. |
Detailed Description
Serial MAC API.
Definition in file serial_mac_api.h.
Typedef Documentation
typedef void data_indication(const serial_mac_api_t *api, const uint8_t *data_ptr, uint16_t data_length) |
data_indication Data indication is called when MAC layer has received data
- Parameters:
-
api The API which handled the response data Data to be sent data_length Length of the data
Definition at line 55 of file serial_mac_api.h.
typedef int8_t data_request(const serial_mac_api_t *api, const uint8_t *data_ptr, uint16_t data_length) |
data_request data request call
- Parameters:
-
api API to handle the request data Data to be sent data_length Length of the data
Definition at line 46 of file serial_mac_api.h.
typedef int8_t serial_mac_api_initialize(serial_mac_api_t *api, data_indication *ind_cb) |
*
serial_mac_api_initialize Initialises Serial MAC layer into use
- Parameters:
-
api API to initialize ind_cb Callback to call when data is received.
- Returns:
- 0 if success, -1 if api is invalid
Definition at line 63 of file serial_mac_api.h.
typedef int8_t serial_mac_virtual_initialize(const serial_mac_api_t *api, int8_t driver_id) |
serial_mac_virtual_initialize Initialises MAC to use virtual driver
- Parameters:
-
api API to start using virtual driver driver_id Virtual driver ID. Must be valid.
- Returns:
- 0 if success, -1 if api or driver is invalid
Definition at line 71 of file serial_mac_api.h.
Function Documentation
serial_mac_api_t* serial_mac_create | ( | int8_t | serial_driver_id ) |
Create serial MAC.
- Parameters:
-
serial_driver_id PHY driver ID.
- Returns:
- Serial MAC callback structure on success.
- NULL on failure.
Generated on Sun Jul 17 2022 08:25:36 by 1.7.2