Gpio Notify Settings - Globalstar ST150 User Manual

Table of Contents

Advertisement

9150-0125-01 R-4

7.12.5 GPIO Notify settings

The GPIO API can be configured to generate notifications in the form of URC messages upon GPIO input events.
The available events are:
#define GPIO_NOTIFY_ISR_TRIGGERED
#define GPIO_NOTIFY_PROPERTY_TRIGGERED
#define GPIO_NOTIFY_HARDWARE_ERROR_DETECT
Use the following command to turn on the desired URC notifications:
AT+GPIONSF =<gpioNotifyFlags>
Where <gpioNotifyFlags> is a bitmask of the above values.
The active flags can be queried via:
AT+GPIONSF?
The notification enumeration is as follows:
typedef enum
{
GPIO_EVENT_TYPE_INVALID = 0,
GPIO_EVENT_ISR_TRIGGERED,
GPIO_EVENT_PROPERTY_TRIGGERED,
GPIO_EVENT_HARDWARE_ERROR_DETECTED,
} gpio_event_types_enum;
The URC notifications will come back in the standard URC format, e. g:
"+URC: "GPIO",<MessageSource_t><GPIOEventType>,eventspecificparams"
The most common event to be reported with be the ISR event, which put simply, means that the state of that
input. The format of the ISR event URC is:
+URC: "GPIO",<MessageSource_t>,<GPIOEventType>,<key>,<pin>,<readState>
In one of the examples above, we reserved the pin who's key is "0", and the Nordic pin number is "2". When
this pin transitions from low to high, the URC generated will be:
+URC: "GPIO",17,1,0,2,1
ST150M User Manual
0x00000001
0x00000002
0x00000004
Confidential & Proprietary Information
51

Advertisement

Table of Contents
loading

This manual is also suitable for:

St150m-devkit

Table of Contents