Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
micropython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
xpstem
micropython
Commits
14432b5d
Commit
14432b5d
authored
Nov 24, 2023
by
Damien George
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
extmod/modmachine: Make I2C/SPI defns available when soft impl enabled.
Signed-off-by:
Damien George
<
damien@micropython.org
>
parent
7b2f13fb
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
6 deletions
+10
-6
extmod/modmachine.h
extmod/modmachine.h
+10
-6
No files found.
extmod/modmachine.h
View file @
14432b5d
...
...
@@ -114,7 +114,7 @@
} \
} while (0)
#if MICROPY_PY_MACHINE_I2C
#if MICROPY_PY_MACHINE_I2C
|| MICROPY_PY_MACHINE_SOFTI2C
#define MP_MACHINE_I2C_FLAG_READ (0x01) // if not set then it's a write
#define MP_MACHINE_I2C_FLAG_STOP (0x02)
...
...
@@ -139,7 +139,7 @@ typedef struct _machine_mem_obj_t {
unsigned
elem_size
;
// in bytes
}
machine_mem_obj_t
;
#if MICROPY_PY_MACHINE_I2C
#if MICROPY_PY_MACHINE_I2C
|| MICROPY_PY_MACHINE_SOFTI2C
typedef
struct
_mp_machine_i2c_buf_t
{
size_t
len
;
...
...
@@ -175,7 +175,7 @@ typedef struct _mp_machine_soft_i2c_obj_t {
#endif
#if MICROPY_PY_MACHINE_SPI
#if MICROPY_PY_MACHINE_SPI
|| MICROPY_PY_MACHINE_SOFTSPI
// SPI protocol.
typedef
struct
_mp_machine_spi_p_t
{
...
...
@@ -215,16 +215,20 @@ extern const mp_obj_type_t machine_timer_type;
extern
const
mp_obj_type_t
machine_uart_type
;
extern
const
mp_obj_type_t
machine_wdt_type
;
#if MICROPY_PY_MACHINE_I2C
#if MICROPY_PY_MACHINE_
SOFT
I2C
extern
const
mp_obj_type_t
mp_machine_soft_i2c_type
;
#endif
#if MICROPY_PY_MACHINE_I2C || MICROPY_PY_MACHINE_SOFTI2C
extern
const
mp_obj_dict_t
mp_machine_i2c_locals_dict
;
#endif
#if MICROPY_PY_MACHINE_SPI
#if MICROPY_PY_MACHINE_S
OFTS
PI
extern
const
mp_obj_type_t
mp_machine_soft_spi_type
;
extern
const
mp_obj_dict_t
mp_machine_spi_locals_dict
;
extern
const
mp_machine_spi_p_t
mp_machine_soft_spi_p
;
#endif
#if MICROPY_PY_MACHINE_SPI || MICROPY_PY_MACHINE_SOFTSPI
extern
const
mp_obj_dict_t
mp_machine_spi_locals_dict
;
#endif
#if defined(MICROPY_MACHINE_MEM_GET_READ_ADDR)
uintptr_t
MICROPY_MACHINE_MEM_GET_READ_ADDR
(
mp_obj_t
addr_o
,
uint
align
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment