Skip to content

Commit 8bc3fc2

Browse files
committed
esp8266: Rename "machine" module implementation to use contemporary naming.
Previously they used historical "pyb" affix causing confusion and inconsistency (there's no "pyb" module in modern ports; but people took esp8266 port as an example, and "pyb" naming kept proliferating, while other people complained that source structure is not clear).
1 parent 3ccdbf7 commit 8bc3fc2

21 files changed

Lines changed: 38 additions & 68 deletions

esp8266/Makefile

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -78,19 +78,19 @@ SRC_C = \
7878
espapa102.c \
7979
intr.c \
8080
modpyb.c \
81-
modpybpin.c \
82-
modpybpwm.c \
83-
modpybrtc.c \
84-
modpybadc.c \
85-
modpybuart.c \
86-
modmachinewdt.c \
87-
modpybspi.c \
88-
modpybhspi.c \
81+
modmachine.c \
82+
machine_pin.c \
83+
machine_pwm.c \
84+
machine_rtc.c \
85+
machine_adc.c \
86+
machine_uart.c \
87+
machine_wdt.c \
88+
machine_spi.c \
89+
machine_hspi.c \
8990
modesp.c \
9091
modnetwork.c \
9192
modutime.c \
9293
moduos.c \
93-
modmachine.c \
9494
modonewire.c \
9595
ets_alt_task.c \
9696
fatfs_port.c \

esp8266/esp8266.ld

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -137,16 +137,16 @@ SECTIONS
137137
*lexerstr32.o(.literal* .text*)
138138
*utils.o(.literal* .text*)
139139
*modpyb.o(.literal*, .text*)
140-
*modpybpin.o(.literal*, .text*)
141-
*modpybpwm.o(.literal*, .text*)
142-
*modpybrtc.o(.literal*, .text*)
143-
*modpybadc.o(.literal*, .text*)
144-
*modpybuart.o(.literal*, .text*)
140+
*machine_pin.o(.literal*, .text*)
141+
*machine_pwm.o(.literal*, .text*)
142+
*machine_rtc.o(.literal*, .text*)
143+
*machine_adc.o(.literal*, .text*)
144+
*machine_uart.o(.literal*, .text*)
145145
*modpybi2c.o(.literal*, .text*)
146146
*modmachine.o(.literal*, .text*)
147-
*modmachinewdt.o(.literal*, .text*)
148-
*modpybspi.o(.literal*, .text*)
149-
*modpybhspi.o(.literal*, .text*)
147+
*machine_wdt.o(.literal*, .text*)
148+
*machine_spi.o(.literal*, .text*)
149+
*machine_hspi.o(.literal*, .text*)
150150
*hspi.o(.literal*, .text*)
151151
*modesp.o(.literal* .text*)
152152
*modnetwork.o(.literal* .text*)

esp8266/esp_mphal.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ void ets_event_poll(void);
7575
// C-level pin HAL
7676
#include "etshal.h"
7777
#include "gpio.h"
78-
#include "esp8266/modpyb.h"
78+
#include "esp8266/modmachine.h"
7979
#define mp_hal_pin_obj_t uint32_t
8080
#define mp_hal_get_pin_obj(o) mp_obj_get_pin(o)
8181
void mp_hal_pin_input(mp_hal_pin_obj_t pin);

esp8266/esponewire.c

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

2929
#include "etshal.h"
3030
#include "user_interface.h"
31-
#include "modpyb.h"
31+
#include "modmachine.h"
3232
#include "esponewire.h"
3333

3434
#define TIMING_RESET1 (0)

esp8266/fatfs_port.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
#include "py/obj.h"
2828
#include "lib/fatfs/ff.h"
2929
#include "timeutils.h"
30-
#include "modpybrtc.h"
30+
#include "modmachine.h"
3131

3232
DWORD get_fattime(void) {
3333

esp8266/intr.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
#include "etshal.h"
2828
#include "ets_alt_task.h"
2929

30-
#include "modpyb.h"
30+
#include "modmachine.h"
3131

3232
// this is in a separate file so it can go in iRAM
3333
void pin_intr_handler_iram(void *arg) {
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
#include "py/runtime.h"
3838
#include "py/gc.h"
3939
#include "py/mphal.h"
40-
#include "modpyb.h"
40+
#include "modmachine.h"
4141

4242
#define GET_TRIGGER(phys_port) \
4343
GPIO_PIN_INT_TYPE_GET(GPIO_REG_READ(GPIO_PIN_ADDR(phys_port)))
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131

3232
#include "py/nlr.h"
3333
#include "py/runtime.h"
34-
#include "modpyb.h"
34+
#include "modmachine.h"
3535

3636
typedef struct _pyb_pwm_obj_t {
3737
mp_obj_base_t base;

0 commit comments

Comments
 (0)