Getting The Input State Of Mapped Inputs; Gpio Notify Settings - Globalstar ST150M User Manual

Hide thumbs Also See for ST150M:
Table of Contents

Advertisement

9150-0125-01 R-1

7.12.4 GETTING THE INPUT STATE OF MAPPED INPUTS:

The command "AT+GETINSTATE=<input number>" gets the state of the input. The argument is the OTA message input field
that it is mapped to, not the Nordic input number or the key.
For example, in the above examples, virtual input 48, "ACCEL In Motion" is mapped to input 1, so the following response,
shows us that we are not in motion:
AT+GETINSTATE=1
+GETINSTATE: 1,0
OK

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
41

Advertisement

Table of Contents
loading

Table of Contents