Lines Matching refs:obj
30 void GpioIoeInit( Gpio_t *obj, PinNames pin, PinModes mode, PinConfigs config, PinTypes type, uint… in GpioIoeInit() argument
38 obj->pin = pin; in GpioIoeInit()
39 obj->pinIndex = ( 0x01 << pin % 16 ); in GpioIoeInit()
41 if( ( obj->pin % 16 ) > 0x07 ) in GpioIoeInit()
44 obj->pinIndex = ( obj->pinIndex >> 8 ) & 0x00FF; in GpioIoeInit()
49 obj->pinIndex = ( obj->pinIndex ) & 0x00FF; in GpioIoeInit()
56 regVal = regVal & ~obj->pinIndex; in GpioIoeInit()
60 regVal = regVal | obj->pinIndex; in GpioIoeInit()
65 if( ( obj->pin % 16 ) > 0x07 ) in GpioIoeInit()
70 SX1509Write( RegOpenDrainB, tempVal | obj->pinIndex ); in GpioIoeInit()
74 SX1509Write( RegOpenDrainB, tempVal & ~obj->pinIndex ); in GpioIoeInit()
83 SX1509Write( RegOpenDrainA, tempVal | obj->pinIndex ); in GpioIoeInit()
87 SX1509Write( RegOpenDrainA, tempVal & ~obj->pinIndex ); in GpioIoeInit()
97 regVal = regVal & ~obj->pinIndex; in GpioIoeInit()
101 regVal = regVal | obj->pinIndex; in GpioIoeInit()
106 void GpioIoeSetContext( Gpio_t *obj, void* context ) in GpioIoeSetContext() argument
108 obj->Context = context; in GpioIoeSetContext()
111 void GpioIoeSetInterrupt( Gpio_t *obj, IrqModes irqMode, IrqPriorities irqPriority, GpioIrqHandler … in GpioIoeSetInterrupt() argument
124 obj->IrqHandler = irqHandler; in GpioIoeSetInterrupt()
126 if( ( obj->pin % 16 ) > 0x07 ) in GpioIoeSetInterrupt()
137 regVal = regVal & ~( obj->pinIndex ); in GpioIoeSetInterrupt()
155 while( tempVal != obj->pinIndex ) in GpioIoeSetInterrupt()
211 GpioIrq[obj->pin & 0x0F] = obj; in GpioIoeSetInterrupt()
214 void GpioIoeRemoveInterrupt( Gpio_t *obj ) in GpioIoeRemoveInterrupt() argument
222 GpioIrq[obj->pin & 0x0F] = NULL; in GpioIoeRemoveInterrupt()
224 if( ( obj->pin % 16 ) > 0x07 ) in GpioIoeRemoveInterrupt()
235 regVal = regVal | obj->pinIndex; in GpioIoeRemoveInterrupt()
240 while( tempVal != obj->pinIndex ) in GpioIoeRemoveInterrupt()
297 void GpioIoeWrite( Gpio_t *obj, uint32_t value ) in GpioIoeWrite() argument
302 if( ( obj->pin % 16 ) > 0x07 ) in GpioIoeWrite()
316 regVal = regVal & ~obj->pinIndex; in GpioIoeWrite()
320 regVal = regVal | obj->pinIndex; in GpioIoeWrite()
325 void GpioIoeToggle( Gpio_t *obj ) in GpioIoeToggle() argument
327 GpioIoeWrite( obj, GpioIoeRead( obj ) ^ 1 ); in GpioIoeToggle()
330 uint32_t GpioIoeRead( Gpio_t *obj ) in GpioIoeRead() argument
335 if( ( obj->pin % 16 ) > 0x07 ) in GpioIoeRead()
346 if( ( regVal & obj->pinIndex ) == 0x00 ) in GpioIoeRead()