* default configuration.\r
*/\r
#if !defined(SERIAL_DEFAULT_BITRATE) || defined(__DOXYGEN__)\r
-#define SERIAL_DEFAULT_BITRATE 9600\r
+#define SERIAL_DEFAULT_BITRATE 38400\r
#endif\r
\r
/**\r
//Globals
bool input_available(void)
{
+ //return iqGetFullI(&(&SD6)->iqueue)>0;
return iqGetFullI(&(&SD3)->iqueue)>0;
}
uint8_t read_byte(void)
{
return (uint8_t)sdGet(&SD3);
+ //return (uint8_t)sdGet(&SD6);
}
void write_byte(uint8_t b)
{
sdPut(&SD3, b);
+ //sdPut(&SD6, b);
}
uint64_t dpins[] = {LINE_ARD_D0, LINE_ARD_D1, LINE_ARD_D2, LINE_ARD_D3,
void setup(void)
{
+ palSetPadMode(GPIOG, 9, PAL_MODE_ALTERNATE(8)); // USART6 TX
+ palSetPadMode(GPIOG, 14, PAL_MODE_ALTERNATE(8)); // USART6 RX
+
halInit();
chSysInit();
sdStart(&SD3, NULL);
- sdStart(&SD1, NULL);
+// sdStart(&SD6, NULL);
-
+// while(1){
+// sdPut(&SD3, sdGet(&SD6));
+// delay(50);
+// }
}
void debug(char *fmt, ...)
/*\r
* SERIAL driver system settings.\r
*/\r
-#define STM32_SERIAL_USE_USART1 TRUE\r
+#define STM32_SERIAL_USE_USART1 FALSE\r
#define STM32_SERIAL_USE_USART2 FALSE\r
#define STM32_SERIAL_USE_USART3 TRUE\r
#define STM32_SERIAL_USE_UART4 FALSE\r
#define STM32_SERIAL_USE_UART5 FALSE\r
-#define STM32_SERIAL_USE_USART6 FALSE\r
+#define STM32_SERIAL_USE_USART6 TRUE\r
#define STM32_SERIAL_USE_UART7 FALSE\r
#define STM32_SERIAL_USE_UART8 FALSE\r
#define STM32_SERIAL_USART1_PRIORITY 12\r
#define STM32_UART_USE_USART3 FALSE\r
#define STM32_UART_USE_UART4 FALSE\r
#define STM32_UART_USE_UART5 FALSE\r
-#define STM32_UART_USE_USART6 FALSE\r
+#define STM32_UART_USE_USART6 TRUE\r
#define STM32_UART_USE_UART7 FALSE\r
#define STM32_UART_USE_UART8 FALSE\r
#define STM32_UART_USART1_RX_DMA_STREAM STM32_DMA_STREAM_ID(2, 5)\r