![]() |
Ultibo API
C/C++ API for Ultibo Core
|
Go to the source code of this file.
Data Structures | |
| struct | _GPIO_PROPERTIES |
| struct | _GPIO_EVENT |
| struct | _GPIO_PIN |
| struct | _GPIO_DEVICE |
| struct | _GPIO_INFO |
Macros | |
| #define | GPIO_NAME_PREFIX "GPIO" |
| Name prefix for GPIO Devices. | |
| #define | GPIO_TYPE_NONE 0 |
| #define | GPIO_TYPE_MAX 0 |
| #define | GPIO_STATE_DISABLED 0 |
| #define | GPIO_STATE_ENABLED 1 |
| #define | GPIO_STATE_MAX 1 |
| #define | GPIO_FLAG_NONE 0x00000000 |
| #define | GPIO_FLAG_PULL_UP 0x00000001 |
| Device supports Pull Up on a pin. | |
| #define | GPIO_FLAG_PULL_DOWN 0x00000002 |
| Device supports Pull Down on a pin. | |
| #define | GPIO_FLAG_TRIGGER_LOW 0x00000004 |
| Device supports Trigger on Low level on a pin. | |
| #define | GPIO_FLAG_TRIGGER_HIGH 0x00000008 |
| Device supports Trigger on High level on a pin. | |
| #define | GPIO_FLAG_TRIGGER_RISING 0x00000010 |
| Device supports Trigger on Rising edge on a pin. | |
| #define | GPIO_FLAG_TRIGGER_FALLING 0x00000020 |
| Device supports Trigger on Falling edge on a pin. | |
| #define | GPIO_FLAG_TRIGGER_EDGE 0x00000040 |
| Device supports Trigger on any edge (Rising or Falling) on a pin. | |
| #define | GPIO_FLAG_TRIGGER_ASYNC 0x00000080 |
| Device supports Trigger on Asynchronous Rising/Falling edge on a pin. | |
| #define | GPIO_EVENT_FLAG_NONE 0x00000000 |
| #define | GPIO_EVENT_FLAG_REPEAT 0x00000001 |
| Event will be repeated until cancelled. | |
| #define | GPIO_EVENT_FLAG_INTERRUPT 0x00000002 |
| Event will be dispatched by interrupt handler (If applicable). | |
Typedefs | |
| typedef struct _GPIO_PROPERTIES | GPIO_PROPERTIES |
| typedef struct _GPIO_DEVICE | GPIO_DEVICE |
| Forward declared for GPIOPin. | |
| typedef struct _GPIO_PIN | GPIO_PIN |
| Forward declared for GPIOEvent. | |
| typedef struct _GPIO_EVENT | GPIO_EVENT |
| typedef uint32_t STDCALL(* | gpio_enumerate_cb) (GPIO_DEVICE *gpio, void *data) |
| typedef uint32_t STDCALL(* | gpio_notification_cb) (DEVICE *device, void *data, uint32_t notification) |
| typedef uint32_t STDCALL(* | gpio_device_start_proc) (GPIO_DEVICE *gpio) |
| typedef uint32_t STDCALL(* | gpio_device_stop_proc) (GPIO_DEVICE *gpio) |
| typedef uint32_t STDCALL(* | gpio_device_read_proc) (GPIO_DEVICE *gpio, uint32_t reg) |
| typedef void STDCALL(* | gpio_device_write_proc) (GPIO_DEVICE *gpio, uint32_t reg, uint32_t value) |
| typedef uint32_t STDCALL(* | gpio_device_input_get_proc) (GPIO_DEVICE *gpio, uint32_t pin) |
| typedef uint32_t STDCALL(* | gpio_device_input_wait_proc) (GPIO_DEVICE *gpio, uint32_t pin, uint32_t trigger, uint32_t timeout) |
| typedef uint32_t STDCALL(* | gpio_device_input_event_proc) (GPIO_DEVICE *gpio, uint32_t pin, uint32_t trigger, uint32_t flags, uint32_t timeout, gpio_event_cb callback, void *data) |
| typedef uint32_t STDCALL(* | gpio_device_input_cancel_proc) (GPIO_DEVICE *gpio, uint32_t pin) |
| typedef uint32_t STDCALL(* | gpio_device_output_set_proc) (GPIO_DEVICE *gpio, uint32_t pin, uint32_t level) |
| typedef uint32_t STDCALL(* | gpio_device_pull_get_proc) (GPIO_DEVICE *gpio, uint32_t pin) |
| typedef uint32_t STDCALL(* | gpio_device_pull_select_proc) (GPIO_DEVICE *gpio, uint32_t pin, uint32_t mode) |
| typedef uint32_t STDCALL(* | gpio_device_function_get_proc) (GPIO_DEVICE *gpio, uint32_t pin) |
| typedef uint32_t STDCALL(* | gpio_device_function_select_proc) (GPIO_DEVICE *gpio, uint32_t pin, uint32_t mode) |
| typedef uint32_t STDCALL(* | gpio_device_get_properties_proc) (GPIO_DEVICE *gpio, GPIO_PROPERTIES *properties) |
| typedef struct _GPIO_INFO | GPIO_INFO |
Functions | |
| uint32_t STDCALL | gpio_device_start (GPIO_DEVICE *gpio) |
| Start the specified GPIO device and enable access. | |
| uint32_t STDCALL | gpio_device_stop (GPIO_DEVICE *gpio) |
| Stop the specified GPIO device and disable access. | |
| uint32_t STDCALL | gpio_device_read (GPIO_DEVICE *gpio, uint32_t reg) |
| Perform a direct read from a register of the specified GPIO device. | |
| void STDCALL | gpio_device_write (GPIO_DEVICE *gpio, uint32_t reg, uint32_t value) |
| Perform a direct write to a register of the specified GPIO device. | |
| uint32_t STDCALL | gpio_device_input_get (GPIO_DEVICE *gpio, uint32_t pin) |
| Get the current state of an input pin on the specified GPIO device. | |
| uint32_t STDCALL | gpio_device_input_wait (GPIO_DEVICE *gpio, uint32_t pin, uint32_t trigger, uint32_t timeout) |
| Wait for the state of a input pin to change on the specified GPIO device. | |
| uint32_t STDCALL | gpio_device_input_event (GPIO_DEVICE *gpio, uint32_t pin, uint32_t trigger, uint32_t flags, uint32_t timeout, gpio_event_cb callback, void *data) |
| Schedule a function to be called when the state of a input pin changes on the specified GPIO device. | |
| uint32_t STDCALL | gpio_device_input_cancel (GPIO_DEVICE *gpio, uint32_t pin) |
| Cancel a previously scheduled event callback function for an input pin on the specified GPIO device. | |
| uint32_t STDCALL | gpio_device_output_set (GPIO_DEVICE *gpio, uint32_t pin, uint32_t level) |
| Set the state of a output pin on the specified GPIO device. | |
| uint32_t STDCALL | gpio_device_level_get (GPIO_DEVICE *gpio, uint32_t pin) |
| Get the current level (state) of a pin on the specified GPIO device. | |
| uint32_t STDCALL | gpio_device_level_set (GPIO_DEVICE *gpio, uint32_t pin, uint32_t level) |
| Set the level (state) of a pin on the specified GPIO device. | |
| uint32_t STDCALL | gpio_device_pull_get (GPIO_DEVICE *gpio, uint32_t pin) |
| Get the current pull state of a pin on the specified GPIO device. | |
| uint32_t STDCALL | gpio_device_pull_select (GPIO_DEVICE *gpio, uint32_t pin, uint32_t mode) |
| Change the pull state of a pin on the specified GPIO device. | |
| uint32_t STDCALL | gpio_device_function_get (GPIO_DEVICE *gpio, uint32_t pin) |
| Get the current function of a pin on the specified GPIO device. | |
| uint32_t STDCALL | gpio_device_function_select (GPIO_DEVICE *gpio, uint32_t pin, uint32_t mode) |
| Change the function of a pin on the specified GPIO device. | |
| uint32_t STDCALL | gpio_device_properties (GPIO_DEVICE *gpio, GPIO_PROPERTIES *properties) |
| Get the properties for the specified GPIO device. | |
| uint32_t STDCALL | gpio_device_get_properties (GPIO_DEVICE *gpio, GPIO_PROPERTIES *properties) |
| Get the properties for the specified GPIO device. | |
| GPIO_DEVICE *STDCALL | gpio_device_create (void) |
| Create a new GPIO entry. | |
| GPIO_DEVICE *STDCALL | gpio_device_create_ex (uint32_t size) |
| Create a new GPIO entry. | |
| uint32_t STDCALL | gpio_device_destroy (GPIO_DEVICE *gpio) |
| Destroy an existing GPIO entry. | |
| uint32_t STDCALL | gpio_device_register (GPIO_DEVICE *gpio) |
| Register a new GPIO in the GPIO table. | |
| uint32_t STDCALL | gpio_device_deregister (GPIO_DEVICE *gpio) |
| Deregister a GPIO from the GPIO table. | |
| GPIO_DEVICE *STDCALL | gpio_device_find (uint32_t gpioid) |
| Find a GPIO device by ID in the GPIO table. | |
| GPIO_DEVICE *STDCALL | gpio_device_find_by_name (const char *name) |
| Find a GPIO device by name in the GPIO table. | |
| GPIO_DEVICE *STDCALL | gpio_device_find_by_description (const char *description) |
| Find a GPIO device by description in the GPIO table. | |
| uint32_t STDCALL | gpio_device_enumerate (gpio_enumerate_cb callback, void *data) |
| Enumerate all GPIO devices in the GPIO table. | |
| uint32_t STDCALL | gpio_device_notification (GPIO_DEVICE *gpio, gpio_notification_cb callback, void *data, uint32_t notification, uint32_t flags) |
| Register a notification for GPIO device changes. | |
| uint32_t STDCALL | gpio_get_count (void) |
| Get the current GPIO count. | |
| GPIO_DEVICE *STDCALL | gpio_device_get_default (void) |
| Get the current default GPIO device. | |
| uint32_t STDCALL | gpio_device_set_default (GPIO_DEVICE *gpio) |
| Set the current default GPIO device. | |
| GPIO_DEVICE *STDCALL | gpio_device_check (GPIO_DEVICE *gpio) |
| Check if the supplied GPIO is in the GPIO table. | |
| uint32_t STDCALL | gpio_type_to_string (uint32_t gpiotype, char *string, uint32_t len) |
| Convert a GPIO type value to a string. | |
| uint32_t STDCALL | gpio_state_to_string (uint32_t gpiostate, char *string, uint32_t len) |
| Convert a GPIO state value to a string. | |
| GPIO_EVENT *STDCALL | gpio_device_create_event (GPIO_DEVICE *gpio, GPIO_PIN *pin, gpio_event_cb callback, void *data, uint32_t timeout) |
| Create a new event using the supplied parameters. | |
| uint32_t STDCALL | gpio_device_destroy_event (GPIO_DEVICE *gpio, GPIO_EVENT *event) |
| Destroy an existing event. | |
| uint32_t STDCALL | gpio_device_register_event (GPIO_DEVICE *gpio, GPIO_PIN *pin, GPIO_EVENT *event) |
| Register an event in the event list of the supplied Pin. | |
| uint32_t STDCALL | gpio_device_deregister_event (GPIO_DEVICE *gpio, GPIO_PIN *pin, GPIO_EVENT *event) |
| Deregister an event from the event list of the supplied Pin. | |
| uint32_t STDCALL | gpio_pin_to_string (uint32_t pin, char *string, uint32_t len) |
| uint32_t STDCALL | gpio_level_to_string (uint32_t level, char *string, uint32_t len) |
| uint32_t STDCALL | gpio_trigger_to_string (uint32_t trigger, char *string, uint32_t len) |
| uint32_t STDCALL | gpio_pull_to_string (uint32_t value, char *string, uint32_t len) |
| uint32_t STDCALL | gpio_function_to_string (uint32_t value, char *string, uint32_t len) |
| #define GPIO_NAME_PREFIX "GPIO" |
Name prefix for GPIO Devices.
GPIO specific constants
| #define GPIO_TYPE_NONE 0 |
GPIO Device Types
| #define GPIO_TYPE_MAX 0 |
| #define GPIO_STATE_DISABLED 0 |
GPIO Device States
| #define GPIO_STATE_ENABLED 1 |
| #define GPIO_STATE_MAX 1 |
| #define GPIO_FLAG_NONE 0x00000000 |
GPIO Device Flags
| #define GPIO_FLAG_PULL_UP 0x00000001 |
Device supports Pull Up on a pin.
| #define GPIO_FLAG_PULL_DOWN 0x00000002 |
Device supports Pull Down on a pin.
| #define GPIO_FLAG_TRIGGER_LOW 0x00000004 |
Device supports Trigger on Low level on a pin.
| #define GPIO_FLAG_TRIGGER_HIGH 0x00000008 |
Device supports Trigger on High level on a pin.
| #define GPIO_FLAG_TRIGGER_RISING 0x00000010 |
Device supports Trigger on Rising edge on a pin.
| #define GPIO_FLAG_TRIGGER_FALLING 0x00000020 |
Device supports Trigger on Falling edge on a pin.
| #define GPIO_FLAG_TRIGGER_EDGE 0x00000040 |
Device supports Trigger on any edge (Rising or Falling) on a pin.
| #define GPIO_FLAG_TRIGGER_ASYNC 0x00000080 |
Device supports Trigger on Asynchronous Rising/Falling edge on a pin.
| #define GPIO_EVENT_FLAG_NONE 0x00000000 |
GPIO Event Flags
| #define GPIO_EVENT_FLAG_REPEAT 0x00000001 |
Event will be repeated until cancelled.
| #define GPIO_EVENT_FLAG_INTERRUPT 0x00000002 |
Event will be dispatched by interrupt handler (If applicable).
| typedef struct _GPIO_PROPERTIES GPIO_PROPERTIES |
GPIO specific types GPIO Properties
| typedef struct _GPIO_DEVICE GPIO_DEVICE |
Forward declared for GPIOPin.
GPIO Device
| typedef struct _GPIO_EVENT GPIO_EVENT |
GPIO Event
| typedef uint32_t STDCALL(* gpio_enumerate_cb) (GPIO_DEVICE *gpio, void *data) |
GPIO Enumeration Callback
| typedef uint32_t STDCALL(* gpio_notification_cb) (DEVICE *device, void *data, uint32_t notification) |
GPIO Notification Callback
| typedef uint32_t STDCALL(* gpio_device_start_proc) (GPIO_DEVICE *gpio) |
GPIO Device Methods
| typedef uint32_t STDCALL(* gpio_device_stop_proc) (GPIO_DEVICE *gpio) |
| typedef uint32_t STDCALL(* gpio_device_read_proc) (GPIO_DEVICE *gpio, uint32_t reg) |
| typedef void STDCALL(* gpio_device_write_proc) (GPIO_DEVICE *gpio, uint32_t reg, uint32_t value) |
| typedef uint32_t STDCALL(* gpio_device_input_get_proc) (GPIO_DEVICE *gpio, uint32_t pin) |
| typedef uint32_t STDCALL(* gpio_device_input_wait_proc) (GPIO_DEVICE *gpio, uint32_t pin, uint32_t trigger, uint32_t timeout) |
| typedef uint32_t STDCALL(* gpio_device_input_event_proc) (GPIO_DEVICE *gpio, uint32_t pin, uint32_t trigger, uint32_t flags, uint32_t timeout, gpio_event_cb callback, void *data) |
| typedef uint32_t STDCALL(* gpio_device_input_cancel_proc) (GPIO_DEVICE *gpio, uint32_t pin) |
| typedef uint32_t STDCALL(* gpio_device_output_set_proc) (GPIO_DEVICE *gpio, uint32_t pin, uint32_t level) |
| typedef uint32_t STDCALL(* gpio_device_pull_get_proc) (GPIO_DEVICE *gpio, uint32_t pin) |
| typedef uint32_t STDCALL(* gpio_device_pull_select_proc) (GPIO_DEVICE *gpio, uint32_t pin, uint32_t mode) |
| typedef uint32_t STDCALL(* gpio_device_function_get_proc) (GPIO_DEVICE *gpio, uint32_t pin) |
| typedef uint32_t STDCALL(* gpio_device_function_select_proc) (GPIO_DEVICE *gpio, uint32_t pin, uint32_t mode) |
| typedef uint32_t STDCALL(* gpio_device_get_properties_proc) (GPIO_DEVICE *gpio, GPIO_PROPERTIES *properties) |
| typedef struct _GPIO_INFO GPIO_INFO |
GPIO Info (Pin Information)
| uint32_t STDCALL gpio_device_start | ( | GPIO_DEVICE * | gpio | ) |
Start the specified GPIO device and enable access.
GPIO Functions
| GPIO | The GPIO device to start |
| uint32_t STDCALL gpio_device_stop | ( | GPIO_DEVICE * | gpio | ) |
Stop the specified GPIO device and disable access.
| GPIO | The GPIO device to stop |
| uint32_t STDCALL gpio_device_read | ( | GPIO_DEVICE * | gpio, |
| uint32_t | reg ) |
Perform a direct read from a register of the specified GPIO device.
| GPIO | The GPIO device to read from |
| Reg | The memory register to read from |
| void STDCALL gpio_device_write | ( | GPIO_DEVICE * | gpio, |
| uint32_t | reg, | ||
| uint32_t | value ) |
Perform a direct write to a register of the specified GPIO device.
| GPIO | The GPIO device to write to |
| Reg | The memory register to write to |
| Value | The value to write to the register |
| uint32_t STDCALL gpio_device_input_get | ( | GPIO_DEVICE * | gpio, |
| uint32_t | pin ) |
Get the current state of an input pin on the specified GPIO device.
| GPIO | The GPIO device to get from |
| Pin | The pin to get the state for (eg GPIO_PIN_1) |
| uint32_t STDCALL gpio_device_input_wait | ( | GPIO_DEVICE * | gpio, |
| uint32_t | pin, | ||
| uint32_t | trigger, | ||
| uint32_t | timeout ) |
Wait for the state of a input pin to change on the specified GPIO device.
| GPIO | The GPIO device to wait for |
| Pin | The pin to wait for the state to change (eg GPIO_PIN_1) |
| Trigger | The trigger event to wait for (eg GPIO_TRIGGER_HIGH) |
| Timeout | Number of milliseconds to wait for the change (INFINITE to wait forever) |
| uint32_t STDCALL gpio_device_input_event | ( | GPIO_DEVICE * | gpio, |
| uint32_t | pin, | ||
| uint32_t | trigger, | ||
| uint32_t | flags, | ||
| uint32_t | timeout, | ||
| gpio_event_cb | callback, | ||
| void * | data ) |
Schedule a function to be called when the state of a input pin changes on the specified GPIO device.
| GPIO | The GPIO device to schedule the callback for |
| Pin | The pin to schedule the state change for (eg GPIO_PIN_1) |
| Trigger | The trigger event which will cause the function to be called (eg GPIO_TRIGGER_HIGH) |
| Flags | The flags to control the event (eg GPIO_EVENT_FLAG_REPEAT) |
| Timeout | The number of milliseconds before the scheduled trigger expires (INFINITE to never expire) |
| Callback | The function to be called when the trigger occurs |
| Data | A pointer to be pass to the function when the trigger occurs (Optional) |
| uint32_t STDCALL gpio_device_input_cancel | ( | GPIO_DEVICE * | gpio, |
| uint32_t | pin ) |
Cancel a previously scheduled event callback function for an input pin on the specified GPIO device.
| GPIO | The GPIO device to cancel the callback for |
| Pin | The pin to cancel the state change for (eg GPIO_PIN_1) |
| uint32_t STDCALL gpio_device_output_set | ( | GPIO_DEVICE * | gpio, |
| uint32_t | pin, | ||
| uint32_t | level ) |
Set the state of a output pin on the specified GPIO device.
| GPIO | The GPIO device to set for |
| Pin | The pin to set the state for (eg GPIO_PIN_1) |
| Level | The state to set the pin to (eg GPIO_LEVEL_HIGH) |
| uint32_t STDCALL gpio_device_level_get | ( | GPIO_DEVICE * | gpio, |
| uint32_t | pin ) |
Get the current level (state) of a pin on the specified GPIO device.
| GPIO | The GPIO device to get from |
| Pin | The pin to get the level for (eg GPIO_PIN_1) |
| uint32_t STDCALL gpio_device_level_set | ( | GPIO_DEVICE * | gpio, |
| uint32_t | pin, | ||
| uint32_t | level ) |
Set the level (state) of a pin on the specified GPIO device.
| GPIO | The GPIO device to set for |
| Pin | The pin to set the level for (eg GPIO_PIN_1) |
| Level | The level to set the pin to (eg GPIO_LEVEL_HIGH) |
| uint32_t STDCALL gpio_device_pull_get | ( | GPIO_DEVICE * | gpio, |
| uint32_t | pin ) |
Get the current pull state of a pin on the specified GPIO device.
| GPIO | The GPIO device to get from |
| Pin | The pin to get the pull state for (eg GPIO_PIN_1) |
| uint32_t STDCALL gpio_device_pull_select | ( | GPIO_DEVICE * | gpio, |
| uint32_t | pin, | ||
| uint32_t | mode ) |
Change the pull state of a pin on the specified GPIO device.
| GPIO | The GPIO device to set for |
| Pin | The pin to change the pull state for (eg GPIO_PIN_1) |
| Mode | The pull state to set for the pin (eg GPIO_PULL_UP) |
| uint32_t STDCALL gpio_device_function_get | ( | GPIO_DEVICE * | gpio, |
| uint32_t | pin ) |
Get the current function of a pin on the specified GPIO device.
| GPIO | The GPIO device to get from |
| Pin | The pin to get the function for (eg GPIO_PIN_1) |
| uint32_t STDCALL gpio_device_function_select | ( | GPIO_DEVICE * | gpio, |
| uint32_t | pin, | ||
| uint32_t | mode ) |
Change the function of a pin on the specified GPIO device.
| GPIO | The GPIO device to set for |
| Pin | The pin to change the function for (eg GPIO_PIN_1) |
| Mode | The function to set for the pin (eg GPIO_FUNCTION_OUT) |
| uint32_t STDCALL gpio_device_properties | ( | GPIO_DEVICE * | gpio, |
| GPIO_PROPERTIES * | properties ) |
Get the properties for the specified GPIO device.
| GPIO | The GPIO device to get properties from |
| Properties | Pointer to a TGPIOProperties structure to fill in |
| uint32_t STDCALL gpio_device_get_properties | ( | GPIO_DEVICE * | gpio, |
| GPIO_PROPERTIES * | properties ) |
Get the properties for the specified GPIO device.
| GPIO | The GPIO device to get properties from |
| Properties | Pointer to a TGPIOProperties structure to fill in |
| GPIO_DEVICE *STDCALL gpio_device_create | ( | void | ) |
Create a new GPIO entry.
| GPIO_DEVICE *STDCALL gpio_device_create_ex | ( | uint32_t | size | ) |
Create a new GPIO entry.
| Size | Size in bytes to allocate for new GPIO (Including the GPIO entry) |
| uint32_t STDCALL gpio_device_destroy | ( | GPIO_DEVICE * | gpio | ) |
Destroy an existing GPIO entry.
| GPIO | The GPIO device to destroy |
| uint32_t STDCALL gpio_device_register | ( | GPIO_DEVICE * | gpio | ) |
Register a new GPIO in the GPIO table.
| GPIO | The GPIO device to register |
| uint32_t STDCALL gpio_device_deregister | ( | GPIO_DEVICE * | gpio | ) |
Deregister a GPIO from the GPIO table.
| GPIO | The GPIO device to deregister |
| GPIO_DEVICE *STDCALL gpio_device_find | ( | uint32_t | gpioid | ) |
Find a GPIO device by ID in the GPIO table.
| GPIOId | The ID number of the GPIO device to find |
| GPIO_DEVICE *STDCALL gpio_device_find_by_name | ( | const char * | name | ) |
Find a GPIO device by name in the GPIO table.
| Name | The name of the GPIO to find (eg GPIO0) |
| GPIO_DEVICE *STDCALL gpio_device_find_by_description | ( | const char * | description | ) |
Find a GPIO device by description in the GPIO table.
| Description | The description of the GPIO to find (eg BCM2836 GPIO) |
| uint32_t STDCALL gpio_device_enumerate | ( | gpio_enumerate_cb | callback, |
| void * | data ) |
Enumerate all GPIO devices in the GPIO table.
| Callback | The callback function to call for each GPIO in the table |
| Data | A private data pointer to pass to callback for each GPIO in the table |
| uint32_t STDCALL gpio_device_notification | ( | GPIO_DEVICE * | gpio, |
| gpio_notification_cb | callback, | ||
| void * | data, | ||
| uint32_t | notification, | ||
| uint32_t | flags ) |
Register a notification for GPIO device changes.
| GPIO | The GPIO device to notify changes for (Optional, pass nil for all GPIO devices) |
| Callback | The function to call when a notification event occurs |
| Data | A private data pointer to pass to callback when a notification event occurs |
| Notification | The events to register for notification of (eg DEVICE_NOTIFICATION_REGISTER) |
| Flags | The flags to control the notification (eg NOTIFIER_FLAG_WORKER) |
| uint32_t STDCALL gpio_get_count | ( | void | ) |
Get the current GPIO count.
GPIO Helper Functions
| GPIO_DEVICE *STDCALL gpio_device_get_default | ( | void | ) |
Get the current default GPIO device.
| uint32_t STDCALL gpio_device_set_default | ( | GPIO_DEVICE * | gpio | ) |
Set the current default GPIO device.
| GPIO_DEVICE *STDCALL gpio_device_check | ( | GPIO_DEVICE * | gpio | ) |
Check if the supplied GPIO is in the GPIO table.
| uint32_t STDCALL gpio_type_to_string | ( | uint32_t | gpiotype, |
| char * | string, | ||
| uint32_t | len ) |
Convert a GPIO type value to a string.
| uint32_t STDCALL gpio_state_to_string | ( | uint32_t | gpiostate, |
| char * | string, | ||
| uint32_t | len ) |
Convert a GPIO state value to a string.
| GPIO_EVENT *STDCALL gpio_device_create_event | ( | GPIO_DEVICE * | gpio, |
| GPIO_PIN * | pin, | ||
| gpio_event_cb | callback, | ||
| void * | data, | ||
| uint32_t | timeout ) |
Create a new event using the supplied parameters.
| uint32_t STDCALL gpio_device_destroy_event | ( | GPIO_DEVICE * | gpio, |
| GPIO_EVENT * | event ) |
Destroy an existing event.
| uint32_t STDCALL gpio_device_register_event | ( | GPIO_DEVICE * | gpio, |
| GPIO_PIN * | pin, | ||
| GPIO_EVENT * | event ) |
Register an event in the event list of the supplied Pin.
| uint32_t STDCALL gpio_device_deregister_event | ( | GPIO_DEVICE * | gpio, |
| GPIO_PIN * | pin, | ||
| GPIO_EVENT * | event ) |
Deregister an event from the event list of the supplied Pin.
| uint32_t STDCALL gpio_pin_to_string | ( | uint32_t | pin, |
| char * | string, | ||
| uint32_t | len ) |
| uint32_t STDCALL gpio_level_to_string | ( | uint32_t | level, |
| char * | string, | ||
| uint32_t | len ) |
| uint32_t STDCALL gpio_trigger_to_string | ( | uint32_t | trigger, |
| char * | string, | ||
| uint32_t | len ) |
| uint32_t STDCALL gpio_pull_to_string | ( | uint32_t | value, |
| char * | string, | ||
| uint32_t | len ) |
| uint32_t STDCALL gpio_function_to_string | ( | uint32_t | value, |
| char * | string, | ||
| uint32_t | len ) |