libnx  v4.6.0
Data Structures | Enumerations | Functions
gpio.h File Reference

GPIO service IPC wrapper. More...

#include "../types.h"
#include "../kernel/event.h"
#include "../sf/service.h"

Go to the source code of this file.

Data Structures

struct  GpioPadSession
 

Enumerations

enum  GpioPadName {
  GpioPadName_AudioCodec = 1 ,
  GpioPadName_ButtonVolUp = 25 ,
  GpioPadName_ButtonVolDown = 26 ,
  GpioPadName_SdCd = 56
}
 
enum  GpioDirection {
  GpioDirection_Input = 0 ,
  GpioDirection_Output = 1
}
 
enum  GpioValue {
  GpioValue_Low = 0 ,
  GpioValue_High = 1
}
 
enum  GpioInterruptMode {
  GpioInterruptMode_LowLevel = 0 ,
  GpioInterruptMode_HighLevel = 1 ,
  GpioInterruptMode_RisingEdge = 2 ,
  GpioInterruptMode_FallingEdge = 3 ,
  GpioInterruptMode_AnyEdge = 4
}
 
enum  GpioInterruptStatus {
  GpioInterruptStatus_Inactive = 0 ,
  GpioInterruptStatus_Active = 1
}
 

Functions

Result gpioInitialize (void)
 Initialize gpio.
 
void gpioExit (void)
 Exit gpio.
 
ServicegpioGetServiceSession (void)
 Gets the Service object for the actual gpio service session.
 
Result gpioOpenSession (GpioPadSession *out, GpioPadName name)
 
Result gpioOpenSession2 (GpioPadSession *out, u32 device_code, u32 access_mode)
 
Result gpioIsWakeEventActive (bool *out, GpioPadName name)
 
Result gpioIsWakeEventActive2 (bool *out, u32 device_code)
 
Result gpioPadSetDirection (GpioPadSession *p, GpioDirection dir)
 
Result gpioPadGetDirection (GpioPadSession *p, GpioDirection *out)
 
Result gpioPadSetInterruptMode (GpioPadSession *p, GpioInterruptMode mode)
 
Result gpioPadGetInterruptMode (GpioPadSession *p, GpioInterruptMode *out)
 
Result gpioPadSetInterruptEnable (GpioPadSession *p, bool en)
 
Result gpioPadGetInterruptEnable (GpioPadSession *p, bool *out)
 
Result gpioPadGetInterruptStatus (GpioPadSession *p, GpioInterruptStatus *out)
 [1.0.0-16.1.0]
 
Result gpioPadClearInterruptStatus (GpioPadSession *p)
 [1.0.0-16.1.0]
 
Result gpioPadSetValue (GpioPadSession *p, GpioValue val)
 
Result gpioPadGetValue (GpioPadSession *p, GpioValue *out)
 
Result gpioPadBindInterrupt (GpioPadSession *p, Event *out)
 
Result gpioPadUnbindInterrupt (GpioPadSession *p)
 
Result gpioPadSetDebounceEnabled (GpioPadSession *p, bool en)
 
Result gpioPadGetDebounceEnabled (GpioPadSession *p, bool *out)
 
Result gpioPadSetDebounceTime (GpioPadSession *p, s32 ms)
 
Result gpioPadGetDebounceTime (GpioPadSession *p, s32 *out)
 
void gpioPadClose (GpioPadSession *p)
 

Detailed Description

GPIO service IPC wrapper.

Author
SciresM