Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
M
micropython
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
card10
micropython
Commits
624738ca
Commit
624738ca
authored
9 years ago
by
Damien George
Browse files
Options
Downloads
Patches
Plain Diff
extmod/machine_i2c: Allow mp_hal_pin_obj_t to be any type, not a ptr.
parent
109990fc
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
esp8266/esp_mphal.h
+1
-1
1 addition, 1 deletion
esp8266/esp_mphal.h
extmod/machine_i2c.c
+2
-2
2 additions, 2 deletions
extmod/machine_i2c.c
stmhal/mphalport.h
+1
-1
1 addition, 1 deletion
stmhal/mphalport.h
with
4 additions
and
4 deletions
esp8266/esp_mphal.h
+
1
−
1
View file @
624738ca
...
@@ -63,7 +63,7 @@ void ets_event_poll(void);
...
@@ -63,7 +63,7 @@ void ets_event_poll(void);
#include
"etshal.h"
#include
"etshal.h"
#include
"gpio.h"
#include
"gpio.h"
#include
"esp8266/modpyb.h"
#include
"esp8266/modpyb.h"
#define mp_hal_pin_obj_t pyb_pin_obj_t
#define mp_hal_pin_obj_t pyb_pin_obj_t
*
#define mp_hal_get_pin_obj(o) mp_obj_get_pin_obj(o)
#define mp_hal_get_pin_obj(o) mp_obj_get_pin_obj(o)
#define mp_hal_pin_config_od(p) do { \
#define mp_hal_pin_config_od(p) do { \
ETS_GPIO_INTR_DISABLE(); \
ETS_GPIO_INTR_DISABLE(); \
...
...
This diff is collapsed.
Click to expand it.
extmod/machine_i2c.c
+
2
−
2
View file @
624738ca
...
@@ -37,8 +37,8 @@
...
@@ -37,8 +37,8 @@
typedef
struct
_machine_i2c_obj_t
{
typedef
struct
_machine_i2c_obj_t
{
mp_obj_base_t
base
;
mp_obj_base_t
base
;
uint32_t
us_delay
;
uint32_t
us_delay
;
mp_hal_pin_obj_t
*
scl
;
mp_hal_pin_obj_t
scl
;
mp_hal_pin_obj_t
*
sda
;
mp_hal_pin_obj_t
sda
;
}
machine_i2c_obj_t
;
}
machine_i2c_obj_t
;
STATIC
void
mp_hal_i2c_delay
(
machine_i2c_obj_t
*
self
)
{
STATIC
void
mp_hal_i2c_delay
(
machine_i2c_obj_t
*
self
)
{
...
...
This diff is collapsed.
Click to expand it.
stmhal/mphalport.h
+
1
−
1
View file @
624738ca
...
@@ -43,7 +43,7 @@ void mp_hal_set_interrupt_char(int c); // -1 to disable
...
@@ -43,7 +43,7 @@ void mp_hal_set_interrupt_char(int c); // -1 to disable
// C-level pin HAL
// C-level pin HAL
#include
"stmhal/pin.h"
#include
"stmhal/pin.h"
#define mp_hal_pin_obj_t pin_obj_t
#define mp_hal_pin_obj_t pin_obj_t
*
#define mp_hal_get_pin_obj(o) (pin_obj_t*)pin_find(o)
#define mp_hal_get_pin_obj(o) (pin_obj_t*)pin_find(o)
#define mp_hal_pin_config_od(p) mp_hal_gpio_config((p)->gpio, (p)->pin, 5, 0, 0)
#define mp_hal_pin_config_od(p) mp_hal_gpio_config((p)->gpio, (p)->pin, 5, 0, 0)
#define mp_hal_pin_low(p) GPIO_clear_pin((p)->gpio, (p)->pin_mask)
#define mp_hal_pin_low(p) GPIO_clear_pin((p)->gpio, (p)->pin_mask)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment