Add support for board version reading via ADC

This commit is contained in:
Harald Welte
2017-02-04 14:43:41 +01:00
parent 9c78cff10b
commit 6732248f71
5 changed files with 93 additions and 1 deletions

View File

@@ -0,0 +1,3 @@
#pragma once
int get_board_version_adc(void);

View File

@@ -53,6 +53,8 @@
#define PIN_PERST2 {PIO_PA26, PIOA, ID_PIOA, PIO_OUTPUT_1, PIO_PULLUP}
#define PINS_PERST { PIN_PERST1, PIN_PERST2 }
#define PIN_VERSION_DET {PIO_PA19, PIOA, ID_PIOA, PIO_PERIPH_D, PIO_DEFAULT}
#define SIMTRACE_VENDOR_ID 0x1d50
#define SIMTRACE_PRODUCT_ID 0x60e3 /* FIXME */
#define USB_VENDOR_ID SIMTRACE_VENDOR_ID