def TIM_ConfigMatch(TIMx, TIM_MatchConfigStruct): '''Configuration for Match register. TIMx: Timer selection, should be: - LPC_TIM0: TIMER0 peripheral - LPC_TIM1: TIMER1 peripheral - LPC_TIM2: TIMER2 peripheral - LPC_TIM3: TIMER3 peripheral TIM_MatchConfigStruct: Pointer to TIM_MATCHCFG_Type - MatchChannel: choose channel 0 or 1 - IntOnMatch: if SET, interrupt will be generated when MRxx match the value in TC - StopOnMatch: if SET, TC and PC will be stopped whenM Rxx match the value in TC - ResetOnMatch: if SET, Reset on MR0 when MRxx match the value in TC - ExtMatchOutputType: Select output for external match 0: Do nothing for external output pin if match 1: Force external output pin to low if match 2: Force external output pin to high if match 3: Toggle external output pin if match MatchValue: Set the value to be compared with TC value ''' return robocaller("TIM_ConfigMatch", "void", TIMx, TIM_MatchConfigStruct)
def SYSTICK_GetCurrentValue(): '''Get current value of System Tick counter. return: current value of System Tick counter ''' return robocaller("SYSTICK_GetCurrentValue", "uint32_t")
def DAC_Init(DACx): '''Initial ADC configuration. Maximum current is 700 uA, Value to AOUT is 0. DACx: pointer to LPC_DAC_TypeDef, should be: LPC_DAC ''' return robocaller("DAC_Init", "void", DACx)
def WDT_GetCurrentCount(): '''Get the current value of WDT. return: current value of WDT ''' return robocaller("WDT_GetCurrentCount", "uint32_t")
def WDT_ReadTimeOutFlag(): '''Read WDT timeout flag. return: timeout flag status of WDT ''' return robocaller("WDT_ReadTimeOutFlag", "FlagStatus")
def NVIC_ClearPendingIRQ(IRQn): """Clear a pending interrupt. Note that this is automatically done for you after your ISR is called, before """ return robocaller("NVIC_ClearPendingIRQ", "void", IRQn)
def EMAC_CheckReceiveIndex(): '''Check whether the current RxConsumeIndex is not equal to the current RxProduceIndex. return: TRUE if they're not equal, otherwise return FALSE ''' return robocaller("EMAC_CheckReceiveIndex", "Bool")
def WDT_Start(TimeOut): '''Start WDT activity with given timeout value. TimeOut: WDT reset after timeout if it is not feed ''' return robocaller("WDT_Start", "void", TimeOut)
def QEI_DeInit(QEIx): '''De-initializes the QEI peripheral registers to their default reset values. QEIx: QEI peripheral, should be LPC_QEI ''' return robocaller("QEI_DeInit", "void", QEIx)
def ADC_DeInit(ADCx): '''Close ADC. ADCx: pointer to LPC_ADC_TypeDef, should be: LPC_ADC ''' return robocaller("ADC_DeInit", "void", ADCx)
def RTC_Init(RTCx): '''Initializes the RTC peripheral.. RTCx: RTC peripheral selected, should be LPC_RTC ''' return robocaller("RTC_Init", "void", RTCx)
def RTC_DeInit(RTCx): '''De-initializes the RTC peripheral registers to their default reset values. RTCx: RTC peripheral selected, should be LPC_RTC ''' return robocaller("RTC_DeInit", "void", RTCx)
def QEI_IntClear(QEIx, ulIntType): '''Clear (force) specified interrupt (pending) in QEI peripheral. QEIx: QEI peripheral, should be LPC_QEI ulIntType: Interrupt Flag Status type, should be: - QEI_INTFLAG_INX_Int: index pulse was detected interrupt - QEI_INTFLAG_TIM_Int: Velocity timer over flow interrupt - QEI_INTFLAG_VELC_Int: Capture velocity is less than compare interrupt - QEI_INTFLAG_DIR_Int: Change of direction interrupt - QEI_INTFLAG_ERR_Int: An encoder phase error interrupt - QEI_INTFLAG_ENCLK_Int: An encoder clock pulse was detected interrupt - QEI_INTFLAG_POS0_Int: position 0 compare value is equal to the current position interrupt - QEI_INTFLAG_POS1_Int: position 1 compare value is equal to the current position interrupt - QEI_INTFLAG_POS2_Int: position 2 compare value is equal to the current position interrupt - QEI_INTFLAG_REV_Int: Index compare value is equal to the current index count interrupt - QEI_INTFLAG_POS0REV_Int: Combined position 0 and revolution count interrupt - QEI_INTFLAG_POS1REV_Int: Combined position 1 and revolution count interrupt - QEI_INTFLAG_POS2REV_Int: Combined position 2 and revolution count interrupt ''' return robocaller("QEI_IntClear", "void", QEIx, ulIntType)
def RTC_ResetClockTickCounter(RTCx): '''Reset clock tick counter in RTC peripheral. RTCx: RTC peripheral selected, should be LPC_RTC ''' return robocaller("RTC_ResetClockTickCounter", "void", RTCx)
def QEI_GetIntStatus(QEIx, ulIntType): '''Check whether if specified interrupt flag status in QEI peripheral is set or not. QEIx: QEI peripheral, should be LPC_QEI ulIntType: Interrupt Flag Status type, should be: - QEI_INTFLAG_INX_Int: index pulse was detected interrupt - QEI_INTFLAG_TIM_Int: Velocity timer over flow interrupt - QEI_INTFLAG_VELC_Int: Capture velocity is less than compare interrupt - QEI_INTFLAG_DIR_Int: Change of direction interrupt - QEI_INTFLAG_ERR_Int: An encoder phase error interrupt - QEI_INTFLAG_ENCLK_Int: An encoder clock pulse was detected interrupt - QEI_INTFLAG_POS0_Int: position 0 compare value is equal to the current position interrupt - QEI_INTFLAG_POS1_Int: position 1 compare value is equal to the current position interrupt - QEI_INTFLAG_POS2_Int: position 2 compare value is equal to the current position interrupt - QEI_INTFLAG_REV_Int: Index compare value is equal to the current index count interrupt - QEI_INTFLAG_POS0REV_Int: Combined position 0 and revolution count interrupt - QEI_INTFLAG_POS1REV_Int: Combined position 1 and revolution count interrupt - QEI_INTFLAG_POS2REV_Int: Combined position 2 and revolution count interrupt return: New State of specified interrupt flag status (SET or RESET) ''' return robocaller("QEI_GetIntStatus", "FlagStatus", QEIx, ulIntType)
def NVIC_SetVTOR(offset): """Set Vector Table Offset value. offset: Offset value """ return robocaller("NVIC_SetVTOR", "void", offset)
def SPI_ClearIntPending(SPIx): '''Clear SPI interrupt flag. SPIx: SPI peripheral definition, should be LPC_SPI ''' return robocaller("SPI_ClearIntPending", "void", SPIx)
def PWM_ResetCounter(PWMx): '''Reset Counter in PWM peripheral. PWMx: PWM peripheral, should be LPC_PWM1 ''' return robocaller("PWM_ResetCounter", "void", PWMx)
def WDT_UpdateTimeOut(TimeOut): '''Update WDT timeout value and feed. TimeOut: timeout value to be updated ''' return robocaller("WDT_UpdateTimeOut", "void", TimeOut)
def MCPWM_Init(MCPWMx): '''Initializes the MCPWM peripheral. MCPWMx: Motor Control PWM peripheral selected. Should be: LPC_MCPWM ''' return robocaller("MCPWM_Init", "void", MCPWMx)
def CLKPWR_GetPCLKSEL(ClkType): """Get current value of each Peripheral Clock Selection. ClkType: Peripheral Clock Selection of each type. Should be: CLKPWR_PCLKSEL_WDT : WDT CLKPWR_PCLKSEL_TIMER0 : Timer 0 CLKPWR_PCLKSEL_TIMER1 : Timer 1 CLKPWR_PCLKSEL_UART0 : UART 0 CLKPWR_PCLKSEL_UART1 : UART 1 CLKPWR_PCLKSEL_PWM1 : PWM 1 CLKPWR_PCLKSEL_I2C0 : I2C 0 CLKPWR_PCLKSEL_SPI : SPI CLKPWR_PCLKSEL_SSP1 : SSP 1 CLKPWR_PCLKSEL_DAC : DAC CLKPWR_PCLKSEL_ADC : ADC CLKPWR_PCLKSEL_CAN1 : CAN 1 CLKPWR_PCLKSEL_CAN2 : CAN 2 CLKPWR_PCLKSEL_ACF : ACF CLKPWR_PCLKSEL_QEI : QEI CLKPWR_PCLKSEL_PCB : PCB CLKPWR_PCLKSEL_I2C1 : I2C 1 CLKPWR_PCLKSEL_SSP0 : SSP 0 CLKPWR_PCLKSEL_TIMER2 : Timer 2 CLKPWR_PCLKSEL_TIMER3 : Timer 3 CLKPWR_PCLKSEL_UART2 : UART 2 CLKPWR_PCLKSEL_UART3 : UART 3 CLKPWR_PCLKSEL_I2C2 : I2C 2 CLKPWR_PCLKSEL_I2S : I2S CLKPWR_PCLKSEL_RIT : RIT CLKPWR_PCLKSEL_SYSCON : SYSCON CLKPWR_PCLKSEL_MC : MC return: Value of Selected Peripheral Clock Selection """ return robocaller("CLKPWR_GetPCLKSEL", "uint32_t", ClkType)
def PWM_DeInit(PWMx): '''De-initializes the PWM peripheral registers to their default reset values. PWMx: PWM peripheral, should be LPC_PWM1 ''' return robocaller("PWM_DeInit", "void", PWMx)
def EMAC_UpdatePHYStatus(): '''Auto-Configures value for the EMAC configuration register to match with current PHY mode. return: 0 if no error, otherwise -1 ''' return robocaller("EMAC_UpdatePHYStatus", "int32_t")
def EMAC_SetFilterMode(ulFilterMode, NewState): '''Enable/Disable Filter mode for each specified type EMAC peripheral. ulFilterMode: Filter mode, should be: EMAC_RFC_UCAST_EN: all frames of unicast types will be accepted EMAC_RFC_BCAST_EN: broadcast frame will be accepted EMAC_RFC_MCAST_EN: all frames of multicast types will be accepted EMAC_RFC_UCAST_HASH_EN: The imperfect hash filter will be applied to unicast addresses EMAC_RFC_MCAST_HASH_EN: The imperfect hash filter will be applied to multicast addresses EMAC_RFC_PERFECT_EN: the destination address will be compared with the 6 byte station address programmed in the station address by the filter EMAC_RFC_MAGP_WOL_EN: the result of the magic packet filter will generate a WoL interrupt when there is a match EMAC_RFC_PFILT_WOL_EN: the result of the perfect address matching filter and the imperfect hash filter will generate a WoL interrupt when there is a match NewState: New State of this command, should be: ENABLE DISABLE ''' return robocaller("EMAC_SetFilterMode", "void", ulFilterMode, NewState)
def SYSTICK_InternalInit(time): '''Initialize System Tick using internal CPU clock source. time: time interval(ms) ''' return robocaller("SYSTICK_InternalInit", "void", time)
def I2S_DeInit(I2Sx): '''Deinitialize I2S transmit or receive. I2Sx: I2S peripheral selected, should be: LPC_I2S ''' return robocaller("I2S_DeInit", "void", I2Sx)
def I2S_Init(I2Sx): '''Initialize I2S. I2Sx: I2S peripheral selected, should be: LPC_I2S ''' return robocaller("I2S_Init", "void", I2Sx)
def I2S_Start(I2Sx): '''Clear all STOP,RESET and MUTE bit, ready to operate. I2Sx: I2S peripheral selected, should be: LPC_I2S ''' return robocaller("I2S_Start", "void", I2Sx)
def SPI_ReceiveData(SPIx): '''Receive a single data from SPIx peripheral. SPIx: SPI peripheral definition, should be LPC_SPI return: Data received (16-bit long) ''' return robocaller("SPI_ReceiveData", "uint16_t", SPIx)
def SPI_SetClock(SPIx, target_clock): '''Setup clock rate for SPI device. SPIx: SPI peripheral definition, should be LPC_SPI target_clock: clock of SPI (Hz) ''' return robocaller("SPI_SetClock", "void", SPIx, target_clock)
def UART_FullModemGetStatus(UARTx): '''Get current status of modem status register. UARTx: LPC_UART1 (only) return: Current value of modem status register ''' return robocaller("UART_FullModemGetStatus", "uint8_t", UARTx)
def SPI_DeInit(SPIx): '''De-initializes the SPIx peripheral registers to their reset values. SPIx: SPI peripheral definition, should be LPC_SPI ''' return robocaller("SPI_DeInit", "void", SPIx)
def SPI_GetDataSize(SPIx): '''Get data bit size per transfer. SPIx: SPI peripheral definition, should be LPC_SPI return: number of bit per transfer, could be 8-16 ''' return robocaller("SPI_GetDataSize", "uint8_t", SPIx)
def SPI_GetIntStatus(SPIx): '''Checks whether the SPI interrupt flag is set or not. SPIx: SPI peripheral definition, should be LPC_SPI return: The new state of SPI Interrupt Flag (SET or RESET) ''' return robocaller("SPI_GetIntStatus", "IntStatus", SPIx)
def UART_RS485SendSlvAddr(UARTx, SlvAddr): '''Send Slave address frames on RS485 bus. UARTx: LPC_UART1 (only) SlvAddr: Slave Address. ''' return robocaller("UART_RS485SendSlvAddr", "void", UARTx, SlvAddr)
def EXTI_Config(EXTICfg): '''Configuration for EXT. Set EXTINT, EXTMODE, EXTPOLAR register. EXTICfg: Pointer to a EXTI_InitTypeDef structure that contains the configuration information for the specified external interrupt ''' return robocaller("EXTI_Config", "void", EXTICfg)
def DAC_ConfigDAConverterControl(DACx, DAC_ConverterConfigStruct): '''To enable the DMA operation and control DMA timer. DACx: pointer to LPC_DAC_TypeDef, should be: LPC_DAC DAC_ConverterConfigStruct: pointer to DAC_CONVERTER_CFG_Type ''' return robocaller("DAC_ConfigDAConverterControl", "void", DACx, DAC_ConverterConfigStruct)
def DAC_UpdateValue(DACx, dac_value): '''Update value to DAC. DACx: pointer to LPC_DAC_TypeDef, should be: LPC_DAC dac_value: value 10 bit to be converted to output ''' return robocaller("DAC_UpdateValue", "void", DACx, dac_value)
def vF_dspl_vectaddconst32(pi_y, pi_x, i_c, i_VectorLen): '''Adds a constant integer i_c to each element in vector pi_x and outputs in pi_y pi_x, pi_y: pointer to 32bit integer arrays i_c: integer i_VectorLen: length of vector ''' return robocaller("vF_dspl_vectaddconst32", "void", pi_y, pi_x, i_c, i_VectorLen)
def vF_dspl_vectmulelement16(psi_z, psi_x, psi_y, i_VectorLen): '''(Doesn't work?) Element by element multiplication of unsigned vectors pi_x, pi_y: pointers to integer arrays i_VectorLen: length of vector pi_z: result of element by element multiplication ''' return robocaller("vF_dspl_vectmulelement16", "void", psi_z, psi_x, psi_y, i_VectorLen)
def vF_dspl_vectadd32(pi_z, pi_x, pi_y, i_VectorLen): '''Adds two unsigned 32 bit integer vectors and returns in pi_z pi_z: pi_x + pi_y pi_x, pi_y, pi_z: pointers to 32bit integer arrays i_VectorLen: length of vector ''' return robocaller("vF_dspl_vectadd32", "void", pi_z, pi_x, pi_y, i_VectorLen)
def vF_dspl_vectaddconst16(psi_y, psi_x, si_c, i_VectorLen): '''Adds a constant integer i_c to each element in vector pi_x and outputs in pi_y psi_x, psi_y: pointer to signed integer arrays si_c: signed integer i_VectorLen: length of vector ''' return robocaller("vF_dspl_vectaddconst16", "void", psi_y, psi_x, si_c, i_VectorLen)
def iF_dspl_dotproduct32(pi_x, pi_y, i_VectorLen): '''Performs pi_x dot pi_y pi_x, pi_y: pointers to integer arrays i_VectorLen: length of vectors return: integer dot product of pi_x and pi_y ''' return robocaller("iF_dspl_dotproduct32", "int", pi_x, pi_y, i_VectorLen)
def vF_dspl_pid(si_Error, pS_Coeff): '''PID Controller si_Error: short int pS_Coeff: pointer to tS_pid_Coeff return: ''' return robocaller("vF_dspl_pid", "int", si_Error, pS_Coeff)
def EMAC_UpdateRxConsumeIndex(): '''Increase the RxConsumeIndex (after reading the Receive buffer to release the Receive buffer) and wrap-around the index if it reaches the maximum Receive Number. ''' return robocaller( "EMAC_UpdateRxConsumeIndex", "void", )
def EMAC_ReadPacketBuffer(pDataStruct): '''Read data from Rx packet data buffer at current index due to RxConsumeIndex. pDataStruct: Pointer to a EMAC_PACKETBUF_Type structure data that contain specified information about Packet data buffer. ''' return robocaller("EMAC_ReadPacketBuffer", "void", pDataStruct)
def PINSEL_ConfigTraceFunc(NewState): '''Configure trace function. NewState: should be one of the following: ENABLE : Enable Trace Function DISABLE : Disable Trace Function ''' return robocaller("PINSEL_ConfigTraceFunc", "void", NewState)
def PWM_GetCaptureValue(PWMx, CaptureChannel): '''Read value of capture register PWM peripheral. PWMx: PWM peripheral, should be LPC_PWM1 CaptureChannel: capture channel number, should be in range 0 to 1 return: Value of capture register ''' return robocaller("PWM_GetCaptureValue", "uint32_t", PWMx, CaptureChannel)
def FIO_ByteClearValue(portNum, byteNum, bitValue): '''Clear bits for FIO port in byte accessible style. portNum: Port number, in range from 0 to 4 byteNum: Byte part number, should be in range from 0 to 3 bitValue: Value that contains all bits in to clear, in range from 0 to 0xFF. ''' return robocaller("FIO_ByteClearValue", "void", portNum, byteNum, bitValue)