Esempio n. 1
0
		CORE_USART_TX_ISREADY(__TARGET_CHIP__),
		CORE_USART_RX(__TARGET_CHIP__),
		CORE_USART_RX_ISREADY(__TARGET_CHIP__),
	}
#endif
#if IFS_SPI_EN
	,{
		// spi
		CORE_SPI_INIT(__TARGET_CHIP__),
		CORE_SPI_FINI(__TARGET_CHIP__),
		CORE_SPI_GET_ABILITY(__TARGET_CHIP__),
		CORE_SPI_ENABLE(__TARGET_CHIP__),
		CORE_SPI_DISABLE(__TARGET_CHIP__),
		CORE_SPI_CONFIG(__TARGET_CHIP__),
		CORE_SPI_SELECT(__TARGET_CHIP__),
		CORE_SPI_DESELECT(__TARGET_CHIP__),
		CORE_SPI_IO_TX(__TARGET_CHIP__),
		CORE_SPI_IO_TX_ISREADY(__TARGET_CHIP__),
		CORE_SPI_IO_RX(__TARGET_CHIP__),
		CORE_SPI_IO_RX_ISREADY(__TARGET_CHIP__),
		CORE_SPI_IO(__TARGET_CHIP__),
		CORE_SPI_IO_DMA_START(__TARGET_CHIP__),
		CORE_SPI_IO_DMA_ISREADY(__TARGET_CHIP__),
		CORE_SPI_IO_DMA_END(__TARGET_CHIP__)
	}
#endif
#if IFS_ADC_EN
	,{
		// adc
		CORE_ADC_INIT(__TARGET_CHIP__),
		CORE_ADC_FINI(__TARGET_CHIP__),
Esempio n. 2
0
	.spi.constants.MODE0 = SPI_MODE0,
	.spi.constants.MODE1 = SPI_MODE1,
	.spi.constants.MODE2 = SPI_MODE2,
	.spi.constants.MODE3 = SPI_MODE3,
	.spi.constants.MSB_FIRST = SPI_MSB_FIRST,
	.spi.constants.LSB_FIRST = SPI_LSB_FIRST,
#endif
	.spi.init = CORE_SPI_INIT(__TARGET_CHIP__),
	.spi.fini = CORE_SPI_FINI(__TARGET_CHIP__),
	.spi.get_ability = CORE_SPI_GET_ABILITY(__TARGET_CHIP__),
	.spi.enable = CORE_SPI_ENABLE(__TARGET_CHIP__),
	.spi.disable = CORE_SPI_DISABLE(__TARGET_CHIP__),
	.spi.config = CORE_SPI_CONFIG(__TARGET_CHIP__),
	.spi.config_cb = CORE_SPI_CONFIG_CB(__TARGET_CHIP__),
	.spi.select = CORE_SPI_SELECT(__TARGET_CHIP__),
	.spi.deselect = CORE_SPI_DESELECT(__TARGET_CHIP__),
	.spi.start = CORE_SPI_START(__TARGET_CHIP__),
	.spi.stop = CORE_SPI_STOP(__TARGET_CHIP__),
#endif
#if IFS_ADC_EN
	.adc.init = CORE_ADC_INIT(__TARGET_CHIP__),
	.adc.fini = CORE_ADC_FINI(__TARGET_CHIP__),
	.adc.config = CORE_ADC_CONFIG(__TARGET_CHIP__),
	.adc.config_channel = CORE_ADC_CONFIG_CHANNEL(__TARGET_CHIP__),
	.adc.get_max_value = CORE_ADC_GET_MAX_VALUE(__TARGET_CHIP__),
	.adc.calibrate = CORE_ADC_CALIBRATE(__TARGET_CHIP__),
	.adc.start = CORE_ADC_START(__TARGET_CHIP__),
#endif
#if IFS_IIC_EN
	.i2c.init = NULL,
	.i2c.fini = NULL,