530 #ifndef ti_drivers_PIN__include   531 #define ti_drivers_PIN__include   553 #define PIN_UNASSIGNED              0xFF   554 #define PIN_TERMINATE               0xFE   582 #define PIN_ID(x)                 ((x)&0xFF)   601 #define PIN_GEN             (((uint32_t)1) << 31)      603 #define PIN_INPUT_EN        (PIN_GEN | (0 << 29))      604 #define PIN_INPUT_DIS       (PIN_GEN | (1 << 29))      605 #define PIN_HYSTERESIS      (PIN_GEN | (1 << 30))      606 #define PIN_NOPULL          (PIN_GEN | (0 << 13))      607 #define PIN_PULLUP          (PIN_GEN | (1 << 13))      608 #define PIN_PULLDOWN        (PIN_GEN | (2 << 13))      609 #define PIN_BM_INPUT_EN     (1 << 29)                  610 #define PIN_BM_HYSTERESIS   (1 << 30)                  611 #define PIN_BM_PULLING      (0x3 << 13)                613 #define PIN_BM_INPUT_MODE   (PIN_BM_INPUT_EN|PIN_BM_HYSTERESIS|PIN_BM_PULLING)   616 #define PIN_GPIO_OUTPUT_DIS (PIN_GEN | (0 << 23))      617 #define PIN_GPIO_OUTPUT_EN  (PIN_GEN | (1 << 23))      618 #define PIN_GPIO_LOW        (PIN_GEN | (0 << 22))      619 #define PIN_GPIO_HIGH       (PIN_GEN | (1 << 22))      620 #define PIN_PUSHPULL        (PIN_GEN | (0 << 25))      621 #define PIN_OPENDRAIN       (PIN_GEN | (2 << 25))      622 #define PIN_OPENSOURCE      (PIN_GEN | (3 << 25))      623 #define PIN_SLEWCTRL        (PIN_GEN | (1 << 12))      624 #define PIN_DRVSTR_MIN      (PIN_GEN | (0x0 << 8))     625 #define PIN_DRVSTR_MED      (PIN_GEN | (0x4 << 8))     626 #define PIN_DRVSTR_MAX      (PIN_GEN | (0x8 << 8))     627 #define PIN_BM_GPIO_OUTPUT_EN  (1 << 23)               628 #define PIN_BM_GPIO_OUTPUT_VAL (1 << 22)               629 #define PIN_BM_OUTPUT_BUF   (0x3 << 25)                630 #define PIN_BM_SLEWCTRL     (0x1 << 12)                631 #define PIN_BM_DRVSTR       (0xF << 8)                 633 #define PIN_BM_OUTPUT_MODE  (PIN_BM_GPIO_OUTPUT_VAL | PIN_BM_GPIO_OUTPUT_EN | \   635                              PIN_BM_OUTPUT_BUF | PIN_BM_SLEWCTRL | PIN_BM_DRVSTR)   637 #define PIN_INV_INOUT       (PIN_GEN | (1 << 24))      638 #define PIN_BM_INV_INOUT    (1 << 24)                  640 #define PIN_IRQ_DIS         (PIN_GEN | (0x0 << 16))    641 #define PIN_IRQ_NEGEDGE     (PIN_GEN | (0x5 << 16))    642 #define PIN_IRQ_POSEDGE     (PIN_GEN | (0x6 << 16))    643 #define PIN_IRQ_BOTHEDGES   (PIN_GEN | (0x7 << 16))    644 #define PIN_BM_IRQ          (0x7 << 16)                646 #define PIN_BM_ALL        (PIN_BM_INPUT_MODE | PIN_BM_OUTPUT_MODE | PIN_BM_INV_INOUT | PIN_BM_IRQ)   676 typedef void (*
PIN_IntCb)(PIN_Handle handle, PIN_Id pinId);
   762 extern void PIN_close(PIN_Handle handle);
   772 static inline void PIN_setUserArg(PIN_Handle handle, uintptr_t arg) {
   786 static inline uintptr_t PIN_getUserArg(PIN_Handle handle) {
 uint8_t PIN_Id
Pin identifier data type. 
Definition: PIN.h:550
PIN_Status PIN_setInterrupt(PIN_Handle handle, PIN_Config pinCfg)
Control interrupt enable and edge for pin. 
Operation not supported. 
Definition: PIN.h:692
PIN_Status PIN_setOutputValue(PIN_Handle handle, PIN_Id pinId, uint32_t val)
Control output value for GPIO pin. 
PIN_Status PIN_setPortOutputValue(PIN_Handle handle, uint32_t outputValueMask)
Simultaneous write output buffer values of all allocated pins in GPIO port. 
PIN_Status PIN_setConfig(PIN_Handle handle, PIN_Config updateMask, PIN_Config pinCfg)
Sets complete pin configuration. 
PIN_Status PIN_add(PIN_Handle handle, PIN_Config pinCfg)
Add pin to pin set for open PIN handle. 
PIN_Status PIN_init(const PIN_Config aPinCfg[])
PIN module initialization. 
uint32_t PIN_getInputValue(PIN_Id pinId)
Get pin input value (0/1) 
uint32_t portMask
Bitmask for pins allocated in port. 
Definition: PIN.h:682
void(* PIN_IntCb)(PIN_Handle handle, PIN_Id pinId)
I/O Interrupt callback function pointer type One PIN Interrupt callback can be registered by each PIN...
Definition: PIN.h:675
PIN_Handle PIN_open(PIN_State *state, const PIN_Config pinList[])
Allocate one or more pins for a driver or an application. 
uintptr_t userArg
User argument for whole handle. 
Definition: PIN.h:683
PIN_Config PIN_getConfig(PIN_Id pinId)
Returns pin configuration. 
PIN_State * PIN_Handle
A handle that is returned from a PIN_open() call Used for further PIN client interaction with the PIN...
Definition: PIN.h:663
PIN_Status PIN_remove(PIN_Handle handle, PIN_Id pinId)
Removes pin from pin set foropen PIN handle. 
uint32_t PIN_getPortInputValue(PIN_Handle handle)
Read input value of whole GPIO port. 
underlying data structure for type PIN_State 
Definition: PIN.h:680
PIN_Status PIN_setPortOutputEnable(PIN_Handle handle, uint32_t outputEnableMask)
Set output enable for all pins allocated to client in GPIO port. 
PIN_Status PIN_setOutputEnable(PIN_Handle handle, PIN_Id pinId, bool outputEnable)
Control output enable for GPIO pin. 
PIN_Status
Return value for many functions in the PIN driver interface. 
Definition: PIN.h:688
Operation succeeded. 
Definition: PIN.h:689
void PIN_close(PIN_Handle handle)
Deallocate all pins previously allocated with a call to PIN_open(). 
uint32_t PIN_getOutputValue(PIN_Id pinId)
Get value of GPIO pin output buffer. 
uint32_t PIN_getPortOutputValue(PIN_Handle handle)
Returns value of whole GPIO port's output buffers. 
PIN_Status PIN_clrPendInterrupt(PIN_Handle handle, PIN_Id pinId)
Clear pending interrupt for pin, if any. 
PIN_Status PIN_registerIntCb(PIN_Handle handle, PIN_IntCb callbackFxn)
Register callback function for a set of pins. 
Operation failed, client does not have access to pin. 
Definition: PIN.h:691
Operation failed, some pin already allocated. 
Definition: PIN.h:690
uint32_t PIN_getPortMask(PIN_Handle handle)
Returns bitmask indicating pins allocated to client in GPIO port. 
PIN_IntCb callbackFxn
Pointer to interrupt callback function. 
Definition: PIN.h:681
uint32_t PIN_Config
Pin configuration data type with embedded pin identifier. 
Definition: PIN.h:570