micropython/ports/zephyr/modmachine.h
Damien George e1ec6af654 extmod/modmachine: Provide common bindings for 6 bare-metal functions.
Minor changes for consistency are:
- nrf gains: unique_id(), freq() [they do nothing]
- samd: deepsleep() now resets after calling lightsleep()
- esp32: lightsleep()/deepsleep() no longer take kw arg "sleep", instead
  it's positional to match others.  also, passing 0 here will now do a 0ms
  sleep instead of acting like nothing was passed.
  reset_cause() no longer takes any args (before it would just ignore them)
- mimxrt: freq() with an argument and lightsleep() both raise
  NotImplementedError

Signed-off-by: Damien George <damien@micropython.org>
2023-11-30 16:11:11 +11:00

16 lines
362 B
C

#ifndef MICROPY_INCLUDED_ZEPHYR_MODMACHINE_H
#define MICROPY_INCLUDED_ZEPHYR_MODMACHINE_H
#include "py/obj.h"
typedef struct _machine_pin_obj_t {
mp_obj_base_t base;
const struct device *port;
uint32_t pin;
struct _machine_pin_irq_obj_t *irq;
} machine_pin_obj_t;
void machine_pin_deinit(void);
#endif // MICROPY_INCLUDED_ZEPHYR_MODMACHINE_H