Cascoda SDK
Cascoda SDK for building software to run with CA-821x transceivers
ca821x-posix.h File Reference

Utility functions for using the cascoda sdk on posix. More...

Include dependency graph for ca821x-posix.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

ca_error ca821x_util_init (struct ca821x_dev *pDeviceRef, ca821x_errorhandler errorHandler, union ca821x_util_init_extra_arg arg)
 Generic function to initialise an available ca821x device. More...
 
ca_error ca821x_util_init_path (struct ca821x_dev *pDeviceRef, ca821x_errorhandler errorHandler, enum ca821x_exchange_type exchangeType, const char *path)
 Generic function to initialise a specific device as found via ca821x_util_enumerate or other mechanism. More...
 
void ca821x_util_deinit (struct ca821x_dev *pDeviceRef)
 Generic function to deinitialise an initialised ca821x device. More...
 
ca_error ca821x_util_enumerate (util_device_found aCallback, bool enumerate_uart, void *aContext)
 Function to enumerate all of the connected devices, calling aCallback with a struct describing each one. More...
 
ca_error ca821x_util_reset (struct ca821x_dev *pDeviceRef)
 Generic function to attempt a hard reset of the ca821x chip. More...
 
ca_error ca821x_util_dispatch_poll ()
 Generic function to poll the receive queue and call callbacks for received commands. More...
 
ca_error ca821x_util_start_upstream_dispatch_worker ()
 Start the upstream_dispatch worker, which asynchronously calls the message callbacks (such as MCPS_DATA_indication) as they are received. More...
 
ca_error ca821x_util_stop_upstream_dispatch_worker ()
 Stop the upstream_dispatch worker, so callbacks will no longer be triggered from a separate thread. More...
 
ca_error exchange_register_user_callback (exchange_user_callback callback, struct ca821x_dev *pDeviceRef)
 Registers the callback to call for any non-ca821x commands that are sent over the interface. More...
 
ca_error exchange_wait_send_complete (time_t timeout_s, struct ca821x_dev *pDeviceRef)
 Query whether the given exchange has any messages pending being sent in its send queue. More...
 
ca_error exchange_user_command (uint8_t cmdid, uint8_t cmdlen, uint8_t *payload, struct ca821x_dev *pDeviceRef)
 Sends a user-defined command over the connected interface. More...
 

Detailed Description

Utility functions for using the cascoda sdk on posix.