Skip to content

Commit 6961d22

Browse files
dmascordMrJake222
authored andcommitted
ports/esp8266: Added MP_FASTCODE macro.
Ensuring that timing is correct (to allow for 115200 baud).
1 parent 98eb666 commit 6961d22

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

ports/esp8266/machine_softuart.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ STATIC const mp_rom_map_elem_t pyb_softuart_locals_dict_table[] = {
174174

175175
STATIC MP_DEFINE_CONST_DICT(pyb_softuart_locals_dict, pyb_softuart_locals_dict_table);
176176

177-
STATIC mp_uint_t pyb_softuart_read(mp_obj_t self_in, void *buf_in, mp_uint_t size, int *errcode) {
177+
STATIC mp_uint_t MP_FASTCODE(pyb_softuart_read)(mp_obj_t self_in, void *buf_in, mp_uint_t size, int *errcode) {
178178
pyb_softuart_obj_t *self = MP_OBJ_TO_PTR(self_in);
179179

180180
// make sure we want at least 1 char

ports/esp8266/softuart.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,7 @@ void Softuart_Init(Softuart *s, uint32_t baudrate)
198198
//***********************************
199199

200200
#define RSR_CCOUNT(r) __asm__ __volatile__("rsr %0,ccount":"=a" (r))
201-
static inline uint32_t get_ccount(void)
201+
static inline uint32_t MP_FASTCODE(get_ccount)(void)
202202
{
203203
uint32_t ccount;
204204
RSR_CCOUNT(ccount);
@@ -207,7 +207,7 @@ static inline uint32_t get_ccount(void)
207207

208208
//***********************************
209209

210-
void Softuart_Intr_Handler(void *p)
210+
void MP_FASTCODE(Softuart_Intr_Handler)(void *p)
211211
{
212212
uint8_t level, gpio_id;
213213
unsigned start_time = get_ccount();
@@ -381,7 +381,7 @@ static inline u8 chbit(u8 data, u8 bit)
381381
}
382382

383383
// Function for printing individual characters
384-
void Softuart_Putchar(Softuart *s, char data)
384+
void MP_FASTCODE(Softuart_Putchar)(Softuart *s, char data)
385385
{
386386
unsigned i;
387387
unsigned start_time;

ports/esp8266/softuart.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
#include "user_interface.h"
55

6-
#define SOFTUART_MAX_RX_BUFF 64
6+
#define SOFTUART_MAX_RX_BUFF 256
77

88
#define SOFTUART_GPIO_COUNT 16
99

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy