Example #1
0
def TIM_EM(n):
	return _BIT(n)
Example #2
0
def TIM_CAP_FALLING(n):
	return (_BIT((n * 3) + 1))
Example #3
0
def TIM_INT_ON_CAP(n):
	return (_BIT((n * 3) + 2))
Example #4
0
def TIM_STOP_ON_MATCH(n):
	return (_BIT((n * 3) + 2))
Example #5
0
def TIM_CAP_RISING(n):
	return (_BIT(n * 3))
Example #6
0
def TIM_INT_ON_MATCH(n):
	return (_BIT(n * 3))
Example #7
0
def TIM_RESET_ON_MATCH(n):
	return (_BIT((n * 3) + 1))
Example #8
0
def TIM_CAP_INT(n):
	return (_BIT((n & 0x0F) + 4))
Example #9
0
def TIM_MATCH_INT(n):
	return (_BIT(n & 0x0F))
Example #10
0
def TIM_IR_CLR(n):
	return _BIT(n)
Example #11
0
"""Repetitive interrupt timer client library functions. See LPC17xx 
CMSIS-Compliant Standard Peripheral Firmware Driver Library documentation."""

from internals import robocaller, cstruct
from lpc_types import _BIT

__author__ =			"Neil MacMunn"
__email__ =				"*****@*****.**"
__copyright__ = 	"Copyright 2010, Gumstix Inc"
__license__ = 		"BSD 2-Clause"
__version__ =			"0.1"

RIT_CTRL_INTEN = (1)
RIT_CTRL_ENCLR = _BIT(1)
RIT_CTRL_ENBR	= _BIT(2)
RIT_CTRL_TEN = _BIT(3)

def PARAM_RITx(n):
	return (n == LPC_RIT)

def RIT_DeInit(RITx):
	return robocaller("RIT_DeInit", "void", RITx)

def RIT_Init(RITx):
	return robocaller("RIT_Init", "void", RITx)

def RIT_Cmd(RITx, NewState):
	return robocaller("RIT_Cmd", "void", RITx, NewState)

def RIT_GetIntStatus(RITx):
	return robocaller("RIT_GetIntStatus", "IntStatus", RITx)
Example #12
0
PINSEL_PIN_24 = 24
PINSEL_PIN_25 = 25
PINSEL_PIN_26 = 26
PINSEL_PIN_27 = 27
PINSEL_PIN_28 = 28
PINSEL_PIN_29 = 29
PINSEL_PIN_30 = 30
PINSEL_PIN_31 = 31
PINSEL_PINMODE_PULLUP = 0
PINSEL_PINMODE_TRISTATE = 2
PINSEL_PINMODE_PULLDOWN = 3
PINSEL_PINMODE_NORMAL = 0
PINSEL_PINMODE_OPENDRAIN = 1
PINSEL_I2C_Normal_Mode = 0
PINSEL_I2C_Fast_Mode = 1
PINSEL_I2CPADCFG_SDADRV0 = _BIT(0)
PINSEL_I2CPADCFG_SDAI2C0 = _BIT(1)
PINSEL_I2CPADCFG_SCLDRV0 = _BIT(2)
PINSEL_I2CPADCFG_SCLI2C0 = _BIT(3)


class PINSEL_CFG_Type(cstruct):
    pass


def PINSEL_SetI2C0Pins(i2cPinMode, filterSlewRateEnable):
    return robocaller("PINSEL_SetI2C0Pins", "void", i2cPinMode, filterSlewRateEnable)


def PINSEL_ConfigPin(PinCfg):
    return robocaller("PINSEL_ConfigPin", "void", PinCfg)