Skip to content

Commit 1b8803d

Browse files
committed
ports/nrf: Rebase attempt.
Signed-off-by: RetiredWizard <github@retiredwizard.com>
1 parent aa35d3b commit 1b8803d

File tree

2 files changed

+6
-76
lines changed

2 files changed

+6
-76
lines changed

ports/nrf/Makefile

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -269,11 +269,7 @@ DRIVERS_SRC_C += $(addprefix modules/,\
269269
machine/pin.c \
270270
machine/timer.c \
271271
machine/rtcounter.c \
272-
<<<<<<< HEAD
273-
=======
274272
machine/rtc.c \
275-
machine/pwm.c \
276-
>>>>>>> 38a15c3c21 (ports/nrf: Squashing early commits.)
277273
machine/temp.c \
278274
os/microbitfs.c \
279275
board/modboard.c \

ports/nrf/modules/machine/modmachine.c

Lines changed: 6 additions & 72 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,12 @@
6565
#define MICROPY_PY_MACHINE_RTCOUNTER_ENTRY
6666
#endif
6767

68+
#if MICROPY_PY_MACHINE_RTC
69+
#define MICROPY_PY_MACHINE_RTC_ENTRY { MP_ROM_QSTR(MP_QSTR_RTC), MP_ROM_PTR(&machine_rtc_type) },
70+
#else
71+
#define MICROPY_PY_MACHINE_RTC_ENTRY
72+
#endif
73+
6874
#if MICROPY_PY_MACHINE_TIMER_NRF
6975
#define MICROPY_PY_MACHINE_TIMER_ENTRY { MP_ROM_QSTR(MP_QSTR_Timer), MP_ROM_PTR(&machine_timer_type) },
7076
#else
@@ -235,75 +241,3 @@ static mp_obj_t machine_disable_irq(void) {
235241
return mp_const_none;
236242
}
237243
MP_DEFINE_CONST_FUN_OBJ_0(machine_disable_irq_obj, machine_disable_irq);
238-
<<<<<<< HEAD
239-
=======
240-
241-
STATIC const mp_rom_map_elem_t machine_module_globals_table[] = {
242-
{ MP_ROM_QSTR(MP_QSTR___name__), MP_ROM_QSTR(MP_QSTR_umachine) },
243-
{ MP_ROM_QSTR(MP_QSTR_info), MP_ROM_PTR(&machine_info_obj) },
244-
{ MP_ROM_QSTR(MP_QSTR_reset), MP_ROM_PTR(&machine_reset_obj) },
245-
{ MP_ROM_QSTR(MP_QSTR_soft_reset), MP_ROM_PTR(&machine_soft_reset_obj) },
246-
{ MP_ROM_QSTR(MP_QSTR_bootloader), MP_ROM_PTR(&machine_bootloader_obj) },
247-
{ MP_ROM_QSTR(MP_QSTR_enable_irq), MP_ROM_PTR(&machine_enable_irq_obj) },
248-
{ MP_ROM_QSTR(MP_QSTR_disable_irq), MP_ROM_PTR(&machine_disable_irq_obj) },
249-
{ MP_ROM_QSTR(MP_QSTR_idle), MP_ROM_PTR(&machine_lightsleep_obj) },
250-
{ MP_ROM_QSTR(MP_QSTR_sleep), MP_ROM_PTR(&machine_lightsleep_obj) },
251-
{ MP_ROM_QSTR(MP_QSTR_lightsleep), MP_ROM_PTR(&machine_lightsleep_obj) },
252-
{ MP_ROM_QSTR(MP_QSTR_deepsleep), MP_ROM_PTR(&machine_deepsleep_obj) },
253-
{ MP_ROM_QSTR(MP_QSTR_reset_cause), MP_ROM_PTR(&machine_reset_cause_obj) },
254-
{ MP_ROM_QSTR(MP_QSTR_Pin), MP_ROM_PTR(&pin_type) },
255-
{ MP_ROM_QSTR(MP_QSTR_mem8), MP_ROM_PTR(&machine_mem8_obj) },
256-
{ MP_ROM_QSTR(MP_QSTR_mem16), MP_ROM_PTR(&machine_mem16_obj) },
257-
{ MP_ROM_QSTR(MP_QSTR_mem32), MP_ROM_PTR(&machine_mem32_obj) },
258-
259-
#if MICROPY_PY_MACHINE_UART
260-
{ MP_ROM_QSTR(MP_QSTR_UART), MP_ROM_PTR(&machine_uart_type) },
261-
#endif
262-
#if MICROPY_PY_MACHINE_HW_SPI
263-
{ MP_ROM_QSTR(MP_QSTR_SPI), MP_ROM_PTR(&machine_spi_type) },
264-
#endif
265-
#if MICROPY_PY_MACHINE_I2C
266-
{ MP_ROM_QSTR(MP_QSTR_I2C), MP_ROM_PTR(&machine_i2c_type) },
267-
{ MP_ROM_QSTR(MP_QSTR_SoftI2C), MP_ROM_PTR(&mp_machine_soft_i2c_type) },
268-
#endif
269-
#if MICROPY_PY_MACHINE_ADC
270-
{ MP_ROM_QSTR(MP_QSTR_ADC), MP_ROM_PTR(&machine_adc_type) },
271-
#endif
272-
#if MICROPY_PY_MACHINE_RTCOUNTER
273-
{ MP_ROM_QSTR(MP_QSTR_RTCounter), MP_ROM_PTR(&machine_rtcounter_type) },
274-
#endif
275-
#if MICROPY_PY_MACHINE_TIMER_NRF
276-
{ MP_ROM_QSTR(MP_QSTR_Timer), MP_ROM_PTR(&machine_timer_type) },
277-
#endif
278-
#if MICROPY_PY_MACHINE_HW_PWM
279-
{ MP_ROM_QSTR(MP_QSTR_PWM), MP_ROM_PTR(&machine_pwm_type) },
280-
#endif
281-
#if MICROPY_PY_MACHINE_TEMP
282-
{ MP_ROM_QSTR(MP_QSTR_Temp), MP_ROM_PTR(&machine_temp_type) },
283-
#endif
284-
#if MICROPY_PY_MACHINE_RTC
285-
{ MP_ROM_QSTR(MP_QSTR_RTC), MP_ROM_PTR(&machine_rtc_type) },
286-
#endif
287-
{ MP_ROM_QSTR(MP_QSTR_HARD_RESET), MP_ROM_INT(PYB_RESET_HARD) },
288-
{ MP_ROM_QSTR(MP_QSTR_WDT_RESET), MP_ROM_INT(PYB_RESET_WDT) },
289-
{ MP_ROM_QSTR(MP_QSTR_SOFT_RESET), MP_ROM_INT(PYB_RESET_SOFT) },
290-
{ MP_ROM_QSTR(MP_QSTR_LOCKUP_RESET), MP_ROM_INT(PYB_RESET_LOCKUP) },
291-
{ MP_ROM_QSTR(MP_QSTR_PWRON_RESET), MP_ROM_INT(PYB_RESET_POWER_ON) },
292-
{ MP_ROM_QSTR(MP_QSTR_LPCOMP_RESET), MP_ROM_INT(PYB_RESET_LPCOMP) },
293-
{ MP_ROM_QSTR(MP_QSTR_DEBUG_IF_RESET), MP_ROM_INT(PYB_RESET_DIF) },
294-
#if defined(NRF52_SERIES)
295-
{ MP_ROM_QSTR(MP_QSTR_NFC_RESET), MP_ROM_INT(PYB_RESET_NFC) },
296-
#endif
297-
};
298-
299-
STATIC MP_DEFINE_CONST_DICT(machine_module_globals, machine_module_globals_table);
300-
301-
const mp_obj_module_t mp_module_machine = {
302-
.base = { &mp_type_module },
303-
.globals = (mp_obj_dict_t*)&machine_module_globals,
304-
};
305-
306-
MP_REGISTER_MODULE(MP_QSTR_umachine, mp_module_machine);
307-
308-
#endif // MICROPY_PY_MACHINE
309-
>>>>>>> 38a15c3c21 (ports/nrf: Squashing early commits.)

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