Hi,
I would use lwpgio , it's easier to get familiar with it than GPIO posix driver
You might not need what you asked about.
typedef struct {
uint_32_ptr pcr_reg;
GPIO_MemMapPtr gpio_ptr;
uint_32 pinmask; /* since struct holds one pin, pinmask will have only one bit set */
uint_32 flags;
} LWGPIO_STRUCT, _PTR_ LWGPIO_STRUCT_PTR;
This is LWGPIO STRUCT, second member of the struct is pointer to GPIO register. Which might allow you to do desired operations as requested. The following struct is from K60 header file which is inside psp folder (source/psp/cortex_m/cpu)
typedef struct GPIO_MemMap {
uint32_t PDOR; /**< Port Data Output Register, offset: 0x0 */
uint32_t PSOR; /**< Port Set Output Register, offset: 0x4 */
uint32_t PCOR; /**< Port Clear Output Register, offset: 0x8 */
uint32_t PTOR; /**< Port Toggle Output Register, offset: 0xC */
uint32_t PDIR; /**< Port Data Input Register, offset: 0x10 */
uint32_t PDDR; /**< Port Data Direction Register, offset: 0x14 */
} volatile *GPIO_MemMapPtr;
Regards,
c0170