add board_vbus_set() for samd21/d51 to enable usb host vbus
enable host example build for samd21/d51
This commit is contained in:
@@ -48,6 +48,11 @@
|
||||
#define UART_RX_PIN 4
|
||||
#define UART_TX_PIN 5
|
||||
|
||||
static inline void board_vbus_set(uint8_t rhport, bool state) {
|
||||
(void) rhport; (void) state;
|
||||
}
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
@@ -48,6 +48,10 @@
|
||||
#define UART_RX_PIN 4
|
||||
#define UART_TX_PIN 5
|
||||
|
||||
static inline void board_vbus_set(uint8_t rhport, bool state) {
|
||||
(void) rhport; (void) state;
|
||||
}
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
@@ -48,6 +48,10 @@
|
||||
#define UART_RX_PIN 31 // CDC5_RX
|
||||
#define UART_TX_PIN 37 // CDC5_TX
|
||||
|
||||
static inline void board_vbus_set(uint8_t rhport, bool state) {
|
||||
(void) rhport; (void) state;
|
||||
}
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
@@ -44,6 +44,10 @@
|
||||
#define BUTTON_PIN PIN_PB22
|
||||
#define BUTTON_STATE_ACTIVE 0
|
||||
|
||||
static inline void board_vbus_set(uint8_t rhport, bool state) {
|
||||
(void) rhport; (void) state;
|
||||
}
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
@@ -63,6 +63,10 @@
|
||||
#define MAX3421_INTR_PIN 7 // D10
|
||||
#define MAX3421_INTR_EIC_ID 7 // EIC7
|
||||
|
||||
static inline void board_vbus_set(uint8_t rhport, bool state) {
|
||||
(void) rhport; (void) state;
|
||||
}
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
@@ -48,6 +48,10 @@
|
||||
#define UART_RX_PIN 4
|
||||
#define UART_TX_PIN 5
|
||||
|
||||
static inline void board_vbus_set(uint8_t rhport, bool state) {
|
||||
(void) rhport; (void) state;
|
||||
}
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
@@ -63,6 +63,9 @@
|
||||
#define MAX3421_INTR_PIN 7 // D9
|
||||
#define MAX3421_INTR_EIC_ID 7 // EIC7
|
||||
|
||||
static inline void board_vbus_set(uint8_t rhport, bool state) {
|
||||
(void) rhport; (void) state;
|
||||
}
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
@@ -44,6 +44,10 @@
|
||||
#define UART_RX_PIN 8
|
||||
#define UART_TX_PIN 7
|
||||
|
||||
static inline void board_vbus_set(uint8_t rhport, bool state) {
|
||||
(void) rhport; (void) state;
|
||||
}
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
@@ -48,6 +48,10 @@
|
||||
#define UART_RX_PIN 4
|
||||
#define UART_TX_PIN 5
|
||||
|
||||
static inline void board_vbus_set(uint8_t rhport, bool state) {
|
||||
(void) rhport; (void) state;
|
||||
}
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
@@ -37,17 +37,23 @@
|
||||
#endif
|
||||
|
||||
// LED
|
||||
#define LED_PIN /*PA*/17 /*(D13)*/
|
||||
#define LED_PIN 17 // PA17 (D13)
|
||||
#define LED_STATE_ON 1
|
||||
|
||||
// Button
|
||||
#define BUTTON_PIN /*PA*/14 /*(D2)*/
|
||||
#define BUTTON_PIN 14 // PA14 (D2)
|
||||
#define BUTTON_STATE_ACTIVE 0
|
||||
|
||||
// UART
|
||||
#define UART_SERCOM 0
|
||||
#define UART_RX_PIN /*PA*/11 /*(D0)*/
|
||||
#define UART_TX_PIN /*PA*/10 /*(D1)*/
|
||||
#define UART_RX_PIN 11 // PA11 D0
|
||||
#define UART_TX_PIN 10 // PA10 D1
|
||||
|
||||
static inline void board_vbus_set(uint8_t rhport, bool state) {
|
||||
(void) rhport;
|
||||
gpio_set_pin_direction(PIN_PA28, GPIO_DIRECTION_OUT);
|
||||
gpio_set_pin_level(PIN_PA28, state);
|
||||
}
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
@@ -38,3 +38,7 @@
|
||||
#define UART_SERCOM 0
|
||||
#define UART_RX_PIN 7
|
||||
#define UART_TX_PIN 6
|
||||
|
||||
static inline void board_vbus_set(uint8_t rhport, bool state) {
|
||||
(void) rhport; (void) state;
|
||||
}
|
||||
|
Reference in New Issue
Block a user