20. lpc17xx_pinsel Module¶
Pin select client library functions. Find implementation details in LPC17xx CMSIS-Compliant Standard Peripheral Firmware Driver Library documentation.
- class robovero.lpc17xx_pinsel.PINSEL_CFG_Type(**kwargs)¶
Bases: robovero.internals.cstruct
Pin configuration structure.
- Portnum: Port Number, should be PINSEL_PORT_x, where x should be in range
from 0 to 4
- Pinnum: Pin Number, should be PINSEL_PIN_x, where x should be in range from 0
to 31
- Funcnum: Function Number, should be PINSEL_FUNC_x, where x should be in range
from 0 to 3
Pinmode: Pin Mode, should be:
- PINSEL_PINMODE_PULLUP: Internal pull-up resistor
- PINSEL_PINMODE_TRISTATE: Tri-state
- PINSEL_PINMODE_PULLDOWN: Internal pull-down resistor
OpenDrain: OpenDrain mode, should be:
- PINSEL_PINMODE_NORMAL: Pin is in the normal (not open drain) mode
- PINSEL_PINMODE_OPENDRAIN: Pin is in the open drain mode
- ptr: LPC1769 memory address where structure is stored. Use this in place of
the C reference operator (&).
- robovero.lpc17xx_pinsel.PINSEL_ConfigPin(PinCfg)¶
Configure Pin corresponding to specified parameters passed in the PinCfg.
Args:
- PinCfg: Pointer to a PINSEL_CFG_Type structure that contains the configuration
information for the specified pin.
- robovero.lpc17xx_pinsel.PINSEL_ConfigTraceFunc(NewState)¶
Configure trace function.
Args:
- NewState: should be one of the following:
- ENABLE : Enable Trace Function
- DISABLE : Disable Trace Function
- NewState: should be one of the following:
- robovero.lpc17xx_pinsel.PINSEL_SetI2C0Pins(i2cPinMode, filterSlewRateEnable)¶
Setup I2C0 pins.
Args:
- i2cPinMode: I2C pin mode, should be one of the following:
- PINSEL_I2C_Normal_Mode : The standard drive mode
- PINSEL_I2C_Fast_Mode : Fast Mode Plus drive mode
- filterSlewRateEnable: should be:
- ENABLE: Enable filter and slew rate.
- DISABLE: Disable filter and slew rate.
- i2cPinMode: I2C pin mode, should be one of the following: