forked from xuos/xiuos
add adc and dac drivers for hc32f4a0 in XiZi Kernel
This commit is contained in:
parent
3a5d63762b
commit
1b73886dbc
|
@ -177,7 +177,7 @@ struct InitSequenceDesc _board_init[] =
|
||||||
{"hw adc init", HwAdcInit},
|
{"hw adc init", HwAdcInit},
|
||||||
#endif
|
#endif
|
||||||
#ifdef BSP_USING_DAC
|
#ifdef BSP_USING_DAC
|
||||||
{"hw adc init", HwDacInit},
|
{"hw dac init", HwDacInit},
|
||||||
#endif
|
#endif
|
||||||
#ifdef BSP_USING_USB
|
#ifdef BSP_USING_USB
|
||||||
{ "usb", HwUsbHostInit },
|
{ "usb", HwUsbHostInit },
|
||||||
|
|
|
@ -64,7 +64,6 @@ static uint32 DacRead(void *dev, struct BusBlockReadParam *read_param)
|
||||||
|
|
||||||
uint16 dac_set_value = 0;
|
uint16 dac_set_value = 0;
|
||||||
|
|
||||||
// dac_set_value = DAC_GetDataOutputValue(DAC_CH1);
|
|
||||||
dac_set_value = DAC_GetChConvertState(DACx,DAC_CH1);
|
dac_set_value = DAC_GetChConvertState(DACx,DAC_CH1);
|
||||||
|
|
||||||
*(uint16 *)read_param->buffer = dac_set_value;
|
*(uint16 *)read_param->buffer = dac_set_value;
|
||||||
|
|
Loading…
Reference in New Issue