This is Tiny HAL implementation for microcontrollers.
More...
#include "no_platform/no_platform_hal.h"
#include <stdint.h>
#include <stdbool.h>
Go to the source code of this file.
|
typedef int(* | write_block_cb_t) (void *pdata, const void *buffer, int size) |
| The function writes data to communication channel port. More...
|
|
typedef int(* | read_block_cb_t) (void *pdata, void *buffer, int size) |
| The function reads data from communication channel. More...
|
|
typedef void(* | on_frame_cb_t) (void *udata, uint8_t *pdata, int size) |
| on_frame_cb_t is a callback function, which is called every time new frame is received. More...
|
|
typedef void(* | on_tx_frame_cb_t) (void *udata, const uint8_t *pdata, int size) |
| on_frame_send_cb_t is a callback function, which is called every time new frame is sent. More...
|
|
typedef void(* | on_frame_read_cb_t) (void *udata, uint8_t address, uint8_t *pdata, int size) |
| on_frame_read_cb_t is a callback function, which is called every time new frame is received. More...
|
|
typedef void(* | on_frame_send_cb_t) (void *udata, uint8_t address, const uint8_t *pdata, int size) |
| on_frame_send_cb_t is a callback function, which is called every time new frame is sent. More...
|
|
typedef void(* | on_connect_event_cb_t) (void *udata, uint8_t address, bool connected) |
| on_connect_event_cb_t is a callback function, which is called every time connection is established or interrupted. More...
|
|
This is Tiny HAL implementation for microcontrollers.
Tiny HAL Types
◆ on_connect_event_cb_t
typedef void(* on_connect_event_cb_t) (void *udata, uint8_t address, bool connected) |
on_connect_event_cb_t is a callback function, which is called every time connection is established or interrupted.
- Parameters
-
udata | user data |
address | remote client id (only for master device). |
connected | event occured. |
- Returns
- None.
◆ on_frame_cb_t
typedef void(* on_frame_cb_t) (void *udata, uint8_t *pdata, int size) |
on_frame_cb_t is a callback function, which is called every time new frame is received.
- Parameters
-
udata | user data |
pdata | pointer to data received from the channel. |
size | size of data received. |
- Returns
- None.
◆ on_frame_read_cb_t
typedef void(* on_frame_read_cb_t) (void *udata, uint8_t address, uint8_t *pdata, int size) |
on_frame_read_cb_t is a callback function, which is called every time new frame is received.
- Parameters
-
udata | user data |
address | address if peer station |
pdata | pointer to data received from the channel. |
size | size of data received. |
- Returns
- None.
◆ on_frame_send_cb_t
typedef void(* on_frame_send_cb_t) (void *udata, uint8_t address, const uint8_t *pdata, int size) |
on_frame_send_cb_t is a callback function, which is called every time new frame is sent.
- Parameters
-
udata | user data |
address | address of peer station |
pdata | pointer data sent to the channel. |
size | size of data sent. |
- Returns
- None.
◆ on_tx_frame_cb_t
typedef void(* on_tx_frame_cb_t) (void *udata, const uint8_t *pdata, int size) |
on_frame_send_cb_t is a callback function, which is called every time new frame is sent.
- Parameters
-
udata | user data |
pdata | pointer data sent to the channel. |
size | size of data sent. |
- Returns
- None.
◆ read_block_cb_t
typedef int(* read_block_cb_t) (void *pdata, void *buffer, int size) |
The function reads data from communication channel.
- Parameters
-
pdata | - pointer to user private data. - absent in Arduino version |
buffer | - pointer to a buffer to read data to from the channel. |
size | - maximum size of the buffer. |
- See also
- write_block_cb_t
- Returns
- the function must return negative value in case of error or number of bytes actually read or zero.
◆ write_block_cb_t
typedef int(* write_block_cb_t) (void *pdata, const void *buffer, int size) |
The function writes data to communication channel port.
- Parameters
-
pdata | - pointer to user private data - absent in Arduino version |
buffer | - pointer to the data to send to channel. |
size | - size of data to write. |
- See also
- read_block_cb_t
- Returns
- the function must return negative value in case of error or number of bytes written or zero.
◆ tiny_log_level()
void tiny_log_level |
( |
uint8_t |
level | ) |
|
Sets logging level if tiny library is compiled with logs.
- Parameters
-
level | log level to set, or 0 to disable logs |