update
authorMart Lubbers <mart@martlubbers.net>
Mon, 20 Mar 2017 14:06:39 +0000 (15:06 +0100)
committerMart Lubbers <mart@martlubbers.net>
Mon, 20 Mar 2017 14:06:39 +0000 (15:06 +0100)
CleanSerial
client/halconf.h
client/interface.c
client/mcuconf.h

index 51fb89d..27239bb 160000 (submodule)
@@ -1 +1 @@
-Subproject commit 51fb89d38cf4fc3231f32da3fc8bc174eb05a1ab
+Subproject commit 27239bb503b5bd185a37e2bbf165b7192985efa2
index e556d48..1275a5f 100644 (file)
  *          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
index fae81db..59e750e 100644 (file)
 //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,
@@ -83,12 +86,18 @@ void delay(long ms)
 
 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, ...)
index b01b315..642989f 100644 (file)
 /*\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