Skip to content
Snippets Groups Projects
Verified Commit 15bb6ac6 authored by rahix's avatar rahix
Browse files

chore: Fix a few compiler warnings


Signed-off-by: default avatarRahix <rahix@rahix.de>
parent abb5435f
No related branches found
No related tags found
No related merge requests found
...@@ -44,7 +44,7 @@ def main(): ...@@ -44,7 +44,7 @@ def main():
re.DOTALL | re.MULTILINE, re.DOTALL | re.MULTILINE,
) )
args_matcher = re.compile(r"(?P<type>\w+(?:\*+|\s+))(?P<name>\w+),") args_matcher = re.compile(r"(?P<type>(?:const )?\w+(?:\*+|\s+))(?P<name>\w+),")
# Open output files # Open output files
f_client = cx.enter_context(open(args.client, "w")) f_client = cx.enter_context(open(args.client, "w"))
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
#endif #endif
#define API_UART_WRITE 0x1 #define API_UART_WRITE 0x1
API(API_UART_WRITE, void epic_uart_write_str(char*str, intptr_t length)); API(API_UART_WRITE, void epic_uart_write_str(const char*str, intptr_t length));
#define API_UART_READ 0x2 #define API_UART_READ 0x2
API(API_UART_READ, char epic_uart_read_chr(void)); API(API_UART_READ, char epic_uart_read_chr(void));
......
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
#include "card10.h" #include "card10.h"
#include "uart.h" #include "uart.h"
#include "cdcacm.h" #include "cdcacm.h"
#include "leds.h"
#include "api/dispatcher.h" #include "api/dispatcher.h"
extern mxc_uart_regs_t * ConsoleUart; extern mxc_uart_regs_t * ConsoleUart;
...@@ -9,20 +10,20 @@ extern mxc_uart_regs_t * ConsoleUart; ...@@ -9,20 +10,20 @@ extern mxc_uart_regs_t * ConsoleUart;
void epic_uart_write_str(char*str, intptr_t length) void epic_uart_write_str(char*str, intptr_t length)
{ {
UART_Write(ConsoleUart, (uint8_t*)str, length); UART_Write(ConsoleUart, (uint8_t*)str, length);
cdcacm_write((uint8_t*)str, length); cdcacm_write((uint8_t*)str, length);
} }
char epic_uart_read_chr(void) char epic_uart_read_chr(void)
{ {
while(1) { while(1) {
if(UART_NumReadAvail(ConsoleUart) > 0) { if(UART_NumReadAvail(ConsoleUart) > 0) {
return UART_ReadByte(ConsoleUart); return UART_ReadByte(ConsoleUart);
} }
if(cdcacm_num_read_avail() > 0) { if(cdcacm_num_read_avail() > 0) {
return cdcacm_read(); return cdcacm_read();
} }
} }
} }
void epic_leds_set(int led, uint8_t r, uint8_t g, uint8_t b) void epic_leds_set(int led, uint8_t r, uint8_t g, uint8_t b)
......
...@@ -7,6 +7,7 @@ ...@@ -7,6 +7,7 @@
#include "py/runtime.h" #include "py/runtime.h"
#include "epicardium.h" #include "epicardium.h"
#include "mxc_delay.h"
/****************************************************************************** /******************************************************************************
* Serial Communication * Serial Communication
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment