Simple Communication Interface (UART)#
Component that provides simple communication interface using UART. This component is mainly used in NCP communication cases. This is a No-Code component if used together with NCP Interface or NCP Host Communication Interface components.
Modules#
Functions#
Macros#
Function Documentation#
sl_simple_com_init#
void sl_simple_com_init (void )
N/A |
Simple Comm Init.
45
of file common/simple_com/sl_simple_com.h
sl_simple_com_step#
void sl_simple_com_step (void )
N/A |
Step function (used in CPC mode)
50
of file common/simple_com/sl_simple_com.h
sl_simple_com_transmit#
void sl_simple_com_transmit (uint32_t len, const uint8_t * data)
N/A | len | |
N/A | data |
Transmit function
55
of file common/simple_com/sl_simple_com.h
sl_simple_com_transmit_cb#
void sl_simple_com_transmit_cb (sl_status_t status)
N/A | status |
Transmit completed callback
60
of file common/simple_com/sl_simple_com.h
sl_simple_com_receive#
void sl_simple_com_receive (void )
N/A |
Receive function (used in UART mode)
65
of file common/simple_com/sl_simple_com.h
sl_simple_com_receive_cb#
void sl_simple_com_receive_cb (sl_status_t status, uint32_t len, uint8_t * data)
N/A | status | |
N/A | len | |
N/A | data |
Receive completed callback
70
of file common/simple_com/sl_simple_com.h
sl_simple_com_os_task_init#
void sl_simple_com_os_task_init (void )
N/A |
OS initialization function - if the OS is present
75
of file common/simple_com/sl_simple_com.h
sl_simple_com_os_task_proceed#
void sl_simple_com_os_task_proceed (void )
N/A |
Function to trigger the OS task to proceed - if the OS is present
80
of file common/simple_com/sl_simple_com.h
sl_simple_com_robust_pack_data#
size_t sl_simple_com_robust_pack_data (uint8_t * packed_data_ptr, const uint8_t * data, uint16_t len)
[out] | packed_data_ptr | pointer where the packed data should be loaded |
[in] | data | pointer to the data to be packed |
[in] | len | size of the data to be packed |
Pack data between preamble byte and (if turned on) CRC checksum This function adds a 3 byte header containing preamble byte, payload length, CRC flag and CRC value to the header. If CRC is required an 8 bit CRC value will be calculated for the payload and added to the end of packet.
Returns
the size of packed data
78
of file common/simple_com/sl_simple_com_robust.h
sl_simple_com_robust_unpack_data#
sl_simple_com_robust_result_t sl_simple_com_robust_unpack_data (uint8_t * data, size_t len)
[in] | data | pointer to the data to be unpacked |
[in] | len | size of the data to be unpacked |
Unpack packets from byte stream looking for valid headers. This function searches valid headers and extracts payload after the header into destination buffer. Header is validated by 4 bit header CRC and payload can be also validated by optional CRC check.
Returns
the result of the action
92
of file common/simple_com/sl_simple_com_robust.h
Macro Definition Documentation#
SL_SIMPLE_COM_RX_BUF_SIZE#
#define SL_SIMPLE_COM_RX_BUF_SIZEValue:
(260)
44
of file common/simple_com/config/sl_simple_com_config.h
SL_SIMPLE_COM_TX_BUF_SIZE#
#define SL_SIMPLE_COM_TX_BUF_SIZEValue:
(260)
49
of file common/simple_com/config/sl_simple_com_config.h
SL_SIMPLE_COM_ROBUST#
#define SL_SIMPLE_COM_ROBUSTValue:
0
56
of file common/simple_com/config/sl_simple_com_config.h
SL_SIMPLE_COM_ROBUST_CRC#
#define SL_SIMPLE_COM_ROBUST_CRCValue:
1
62
of file common/simple_com/config/sl_simple_com_config.h
SL_SIMPLE_COM_TASK_PRIO#
#define SL_SIMPLE_COM_TASK_PRIOValue:
4
44
of file common/simple_com/config/sl_simple_com_freertos_config.h
SL_SIMPLE_COM_TASK_STACK#
#define SL_SIMPLE_COM_TASK_STACKValue:
1024
49
of file common/simple_com/config/sl_simple_com_freertos_config.h
SL_SIMPLE_COM_TASK_NAME#
#define SL_SIMPLE_COM_TASK_NAMEValue:
"simple_com_task"
54
of file common/simple_com/config/sl_simple_com_freertos_config.h
SL_SIMPLE_COM_TASK_PRIO#
#define SL_SIMPLE_COM_TASK_PRIOValue:
4
44
of file common/simple_com/config/sl_simple_com_micriumos_config.h
SL_SIMPLE_COM_TASK_STACK#
#define SL_SIMPLE_COM_TASK_STACKValue:
1024
49
of file common/simple_com/config/sl_simple_com_micriumos_config.h
SL_SIMPLE_COM_TASK_NAME#
#define SL_SIMPLE_COM_TASK_NAMEValue:
"simple_com_task"
54
of file common/simple_com/config/sl_simple_com_micriumos_config.h
SL_SIMPLE_COM_SEMAPHORE_NAME#
#define SL_SIMPLE_COM_SEMAPHORE_NAMEValue:
"simple_com_semaphore"
59
of file common/simple_com/config/sl_simple_com_micriumos_config.h
SL_SIMPLE_COM_ROBUST_HEADER_SIZE#
#define SL_SIMPLE_COM_ROBUST_HEADER_SIZEValue:
3
51
of file common/simple_com/sl_simple_com_robust.h
sl_simple_com_robust_get_pack_buffer_size#
#define sl_simple_com_robust_get_pack_buffer_sizeValue:
(len)
57
of file common/simple_com/sl_simple_com_robust.h