boards/opencm904: remap uart pins
This commit is contained in:
parent
d559428cc6
commit
46bac6c69b
@ -39,4 +39,7 @@ void board_init(void)
|
|||||||
|
|
||||||
/* configure the RIOT vector table location to internal flash + bootloader offset */
|
/* configure the RIOT vector table location to internal flash + bootloader offset */
|
||||||
SCB->VTOR = LOCATION_VTABLE;
|
SCB->VTOR = LOCATION_VTABLE;
|
||||||
|
|
||||||
|
/* remap USART1 to PB7 and PB6 */
|
||||||
|
AFIO->MAPR |= AFIO_MAPR_USART1_REMAP;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -59,6 +59,15 @@ extern "C" {
|
|||||||
*/
|
*/
|
||||||
#define BTN_B1_PIN GPIO_PIN(PORT_C, 15)
|
#define BTN_B1_PIN GPIO_PIN(PORT_C, 15)
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Pin used to switch RX and TX mode for the Dynamixel TTL bus
|
||||||
|
*
|
||||||
|
* set = TX mode
|
||||||
|
* clear = RX mode
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
#define DXL_DIR_PIN GPIO_PIN(PORT_B, 5)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Use the USART2 for STDIO on this board
|
* @brief Use the USART2 for STDIO on this board
|
||||||
*/
|
*/
|
||||||
|
|||||||
@ -106,8 +106,8 @@ static const uart_conf_t uart_config[] = {
|
|||||||
{
|
{
|
||||||
.dev = USART1,
|
.dev = USART1,
|
||||||
.rcc_mask = RCC_APB2ENR_USART1EN,
|
.rcc_mask = RCC_APB2ENR_USART1EN,
|
||||||
.rx_pin = GPIO_PIN(PORT_A, 10),
|
.rx_pin = GPIO_PIN(PORT_B, 7),
|
||||||
.tx_pin = GPIO_PIN(PORT_A, 9),
|
.tx_pin = GPIO_PIN(PORT_B, 6),
|
||||||
.bus = APB2,
|
.bus = APB2,
|
||||||
.irqn = USART1_IRQn
|
.irqn = USART1_IRQn
|
||||||
},
|
},
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user