File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -40,45 +40,6 @@ void mp_hal_delay_ms(mp_uint_t Delay) {
4040 }
4141}
4242
43- #if PYBRICKS_HUB_DEBUG
44-
45- #include "stm32f4xx.h"
46-
47- uintptr_t mp_hal_stdio_poll (uintptr_t poll_flags ) {
48- uintptr_t ret = 0 ;
49-
50- if ((poll_flags & MP_STREAM_POLL_RD ) && USART6 -> SR & USART_SR_RXNE ) {
51- ret |= MP_STREAM_POLL_RD ;
52- }
53-
54- return ret ;
55- }
56-
57- // Receive single character
58- int mp_hal_stdin_rx_chr (void ) {
59- while (!(USART6 -> SR & USART_SR_RXNE )) {
60- MICROPY_VM_HOOK_LOOP
61- }
62-
63- return USART6 -> DR ;
64- }
65-
66- // Send string of given length
67- void mp_hal_stdout_tx_strn (const char * str , mp_uint_t len ) {
68- while (len -- ) {
69- while (!(USART6 -> SR & USART_SR_TXE )) {
70- MICROPY_VM_HOOK_LOOP
71- }
72- USART6 -> DR = * str ++ ;
73- }
74- }
75-
76- void mp_hal_stdout_tx_flush (void ) {
77- // currently not buffered
78- }
79-
80- #else // !PYBRICKS_HUB_DEBUG
81-
8243uintptr_t mp_hal_stdio_poll (uintptr_t poll_flags ) {
8344 uintptr_t ret = 0 ;
8445
@@ -129,5 +90,3 @@ void mp_hal_stdout_tx_flush(void) {
12990 MICROPY_EVENT_POLL_HOOK
13091 }
13192}
132-
133- #endif // PYBRICKS_HUB_DEBUG
You can’t perform that action at this time.
0 commit comments