mirror of https://github.com/ARMmbed/mbed-os.git
added DAC support
parent
09a627de19
commit
5b36773721
|
@ -40,6 +40,11 @@ typedef enum {
|
|||
ADC_1 = (int)ADC1_BASE
|
||||
} ADCName;
|
||||
|
||||
|
||||
typedef enum {
|
||||
DAC_1 = (int)DAC_BASE
|
||||
} DACName;
|
||||
|
||||
typedef enum {
|
||||
UART_1 = (int)USART1_BASE,
|
||||
UART_2 = (int)USART2_BASE,
|
||||
|
|
|
@ -58,6 +58,13 @@ const PinMap PinMap_ADC[] = {
|
|||
{NC, NC, 0}
|
||||
};
|
||||
|
||||
//*** DAC ***
|
||||
|
||||
const PinMap PinMap_DAC[] = {
|
||||
{PA_5, DAC_1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0xFF, 1, 0)}, // DAC_OUT1
|
||||
{NC, NC, 0}
|
||||
};
|
||||
|
||||
//*** I2C ***
|
||||
|
||||
const PinMap PinMap_I2C_SDA[] = {
|
||||
|
|
|
@ -37,7 +37,7 @@
|
|||
#define DEVICE_INTERRUPTIN 1
|
||||
|
||||
#define DEVICE_ANALOGIN 1
|
||||
#define DEVICE_ANALOGOUT 0 // Not present on this device
|
||||
#define DEVICE_ANALOGOUT 1
|
||||
|
||||
#define DEVICE_SERIAL 1
|
||||
|
||||
|
|
|
@ -60,6 +60,11 @@ struct analogin_s {
|
|||
uint8_t channel;
|
||||
};
|
||||
|
||||
struct dac_s {
|
||||
DACName dac;
|
||||
uint8_t channel;
|
||||
};
|
||||
|
||||
struct serial_s {
|
||||
UARTName uart;
|
||||
int index; // Used by irq
|
||||
|
|
Loading…
Reference in New Issue