mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
boards/sipeed-longan-nano: add periph_dac support
This commit is contained in:
parent
64663ee743
commit
eb9b636fbc
@ -15,6 +15,7 @@ config BOARD_SIPEED_LONGAN_NANO
|
||||
select BOARD_HAS_HXTAL
|
||||
select BOARD_HAS_LXTAL
|
||||
select HAS_PERIPH_ADC
|
||||
select HAS_PERIPH_DAC
|
||||
select HAS_PERIPH_I2C
|
||||
select HAS_PERIPH_PWM
|
||||
select HAS_PERIPH_SPI
|
||||
|
@ -2,6 +2,7 @@ CPU_MODEL = gd32vf103cbt6
|
||||
|
||||
# Put defined MCU peripherals here (in alphabetical order)
|
||||
FEATURES_PROVIDED += periph_adc
|
||||
FEATURES_PROVIDED += periph_dac
|
||||
FEATURES_PROVIDED += periph_i2c
|
||||
FEATURES_PROVIDED += periph_pwm
|
||||
FEATURES_PROVIDED += periph_spi
|
||||
|
@ -32,7 +32,7 @@ on-board components:
|
||||
| RTC | 1 x 32-bit counter, 20-bit prescaler | yes |
|
||||
| WDT | 2 x 12-bit counter, 3-bit prescaler | yes |
|
||||
| ADC | 2 x 12-bit units, 16 channels @ 1 Msps | yes |
|
||||
| DAC | 2 x 12-bit channel | no |
|
||||
| DAC | 2 x 12-bit channel | yes |
|
||||
| UART | - | yes |
|
||||
| USART | 3 | yes |
|
||||
| SPI | 3 | yes |
|
||||
|
@ -77,6 +77,20 @@ static const adc_conf_t adc_config[] = {
|
||||
#define ADC_NUMOF ARRAY_SIZE(adc_config)
|
||||
/** @} */
|
||||
|
||||
/**
|
||||
* @name DAC configuration
|
||||
* @{
|
||||
*/
|
||||
static const dac_conf_t dac_config[] = {
|
||||
#if !CONFIG_SIPEED_LONGAN_NANO_WITH_TFT
|
||||
{ .pin = GPIO_PIN(PORT_A, 4), .chan = 0 },
|
||||
{ .pin = GPIO_PIN(PORT_A, 5), .chan = 1 },
|
||||
};
|
||||
#endif /* !CONFIG_SIPEED_LONGAN_NANO_WITH_TFT */
|
||||
|
||||
#define DAC_NUMOF ARRAY_SIZE(dac_config)
|
||||
/** @} */
|
||||
|
||||
/**
|
||||
* @name PWM configuration
|
||||
* @{
|
||||
|
Loading…
Reference in New Issue
Block a user