예제 #1
0
		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__),
		CORE_ADC_CONFIG(__TARGET_CHIP__),
		CORE_ADC_CONFIG_CHANNEL(__TARGET_CHIP__),
		CORE_ADC_GET_MAX_VALUE(__TARGET_CHIP__),
		CORE_ADC_CALIBRATE(__TARGET_CHIP__),
		CORE_ADC_START(__TARGET_CHIP__),
		CORE_ADC_ISREADY(__TARGET_CHIP__),
		CORE_ADC_GET(__TARGET_CHIP__),
		CORE_ADC_SAMPLE(__TARGET_CHIP__)
	}
#endif
#if IFS_IIC_EN
	,{
		// i2c
		NULL, NULL, NULL, NULL, NULL
	}
#endif
#if IFS_USBD_EN
	,{
		// usbd
예제 #2
0
파일: interfaces.c 프로젝트: hank-fan/vsf
	.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,
#endif
#if IFS_USBD_EN
	.usbd.init = CORE_USBD_INIT(__TARGET_CHIP__),
	.usbd.fini = CORE_USBD_FINI(__TARGET_CHIP__),
	.usbd.reset = CORE_USBD_RESET(__TARGET_CHIP__),
	.usbd.connect = CORE_USBD_CONNECT(__TARGET_CHIP__),
	.usbd.disconnect = CORE_USBD_DISCONNECT(__TARGET_CHIP__),
	.usbd.set_address = CORE_USBD_SET_ADDRESS(__TARGET_CHIP__),
	.usbd.get_address = CORE_USBD_GET_ADDRESS(__TARGET_CHIP__),
	.usbd.suspend = CORE_USBD_SUSPEND(__TARGET_CHIP__),