|
SmartSnippets DA1459x SDK
|
DGTL Declarations. More...
Files | |
| file | dgtl.h |
| Declarations for DGTL. | |
Typedefs | |
| typedef void(* | dgtl_sent_cb_t) (void *user_data) |
| Callback called once tx is completed. More... | |
Enumerations | |
| enum | dgtl_queue_t |
| DGTL queue type. | |
Functions | |
| void | dgtl_app_specific_hci_cb (const dgtl_msg_t *msg) |
| void | dgtl_init (void) |
| void | dgtl_register (dgtl_queue_t queue, uint32_t notif) |
| Register current task for given queue. More... | |
| bool | dgtl_send_ex (dgtl_msg_t *msg, dgtl_sent_cb_t cb, void *user_data) |
| Send message to the DGTL interface. More... | |
| void | dgtl_send (dgtl_msg_t *msg) |
| Send message to the DGTL interface. More... | |
| dgtl_msg_t * | dgtl_receive (dgtl_queue_t queue) |
| Receive message from the DGTL interface. More... | |
| void | dgtl_wkup_handler (void) |
| Wake up handler for dgtl task. More... | |
| void | dgtl_close (void) |
| Send signal to the DGTL task for closing transport. More... | |
DGTL Declarations.
| typedef void(* dgtl_sent_cb_t) (void *user_data) |
Callback called once tx is completed.
This callback is called when DGTL message was sent using dgtl_send_ex() function.
| [in] | user_data | data passed by the user |
| void dgtl_app_specific_hci_cb | ( | const dgtl_msg_t * | msg | ) |
Callback for application specific HCI commands
This function is called by DGTL when HCI command from application specific opcode range is received. It is called when DGTL_APP_SPECIFIC_HCI_ENABLE option is non-zero. Application shall define this function in order to override weak reference defined by DGTL code internally.
msg when no longer needed.| [in] | msg | DGTL message |
| void dgtl_close | ( | void | ) |
Send signal to the DGTL task for closing transport.
It will inform the DGTL task to stop exchanging data. In order to reopen transport, dgtl_wkup_handler() function should be called. This function is blocking and waits until transport has been closed.
| void dgtl_init | ( | void | ) |
Initialize DGTL
This function initializes internal DGTL structures and thus shall be called by the application before using any other DGTL API.
| dgtl_msg_t* dgtl_receive | ( | dgtl_queue_t | queue | ) |
Receive message from the DGTL interface.
This function receives a message from a specified queue from the DGTL interface. The application can only receive messages from the queue it previously registered to using dgtl_register().
The receiver becomes owner of the message and shall free it when it is no longer in use.
| [in] | queue | queue to receive message from |
| void dgtl_register | ( | dgtl_queue_t | queue, |
| uint32_t | notif | ||
| ) |
Register current task for given queue.
This function allows the calling task to register itself as a client to receive messages from a given queue. The DGTL interface will notify application task using notif bitmask whenever a new message is available in the queue, which can be received using dgtl_receive().
| [in] | queue | queue type |
| [in] | notif | notification bitmask to be used |
| void dgtl_send | ( | dgtl_msg_t * | msg | ) |
Send message to the DGTL interface.
This function sends a message to the DGTL interface. The target queue is automatically selected based on the packet type indicator present in the message.
After calling this function, the sender is no longer the owner of the message and should not use it anymore.
| [in] | msg | DGTL message |
| bool dgtl_send_ex | ( | dgtl_msg_t * | msg, |
| dgtl_sent_cb_t | cb, | ||
| void * | user_data | ||
| ) |
Send message to the DGTL interface.
This function sends a message to the DGTL interface. The target queue is automatically selected based on the packet type indicator present in the message. If callback is set, it will be called when tx is completed.
| [in] | msg | DGTL message |
| [in] | cb | callback called once tx is completed |
| [in] | user_data | user data passed to callback |
| void dgtl_wkup_handler | ( | void | ) |
Wake up handler for dgtl task.
Start data receiving in DGTL task. It should be called after closing the DGTL with dgtl_close().
1.8.16