Paul Sokolovsky
f059563507
stmhal/modutime: Refactor to use extmod/utime_mphal.c.
...
This includes making sure that utime_mphal's sleep_ms() and sleep_us()
don't sleep on negative arguments.
2016-10-14 20:42:42 +03:00
Damien George
0bb3c7d3b7
stmhal: Enable machine.time_pulse_us() function.
2016-10-06 12:12:20 +11:00
Damien George
b1537a5752
stmhal/mphalport: Change pin obj type to const pointer, to avoid casts.
2016-10-05 15:51:40 +11:00
Damien George
5deedd6685
stmhal/mphalport: Fix mp_hal_pin_write to use correct pin_mask.
2016-10-03 18:06:58 +11:00
Damien George
077dbf4a86
stmhal/mphalport: Implement mp_hal_pin_{input,output,write}.
2016-10-03 16:44:34 +11:00
Damien George
4b37e775ea
extmod/machine_i2c: Redo mp_hal_pin macros to use open_drain and od_low.
...
mp_hal_pin_config_od is renamed mp_hal_pin_open_drain, and mp_hal_pin_low
is mp_hal_pin_od_low.
2016-05-26 17:06:40 +01:00
Damien George
624738ca64
extmod/machine_i2c: Allow mp_hal_pin_obj_t to be any type, not a ptr.
2016-04-22 09:56:02 +01:00
Tobias Badertscher
dda1a41205
stmhal: L4: Modify mphalport to support L4 MCU.
...
__GPIOI_CLK_ENABLE is defined in hal/l4/inc/Legacy/stm32_hal_legacy.h
as __HAL_RCC_GPIOI_CLK_ENABLE, and that latter macro is not defined
anywhere else (because the L4 does not have port GPIOI). So the test
for GPIOI is needed, along with the test for the CLK_ENABLE macro.
2016-04-21 12:23:28 +01:00
Damien George
e4f963a351
stmhal: Use new generic I2C object in machine module.
2016-04-12 14:06:54 +01:00
Damien George
69a1aaf654
stmhal: Implement basic C-level pin HAL.
2016-04-12 14:06:54 +01:00
Dave Hylands
7bb501ef9f
stmhal: Add a function for setting the pin alternate function
...
mp_hal_gpio_set_af will search for a given function and unit
and set the alternate function to the alternate function index
found.
2016-02-10 21:20:14 -08:00
Damien George
731f359292
all: Add py/mphal.h and use it in all ports.
...
py/mphal.h contains declarations for generic mp_hal_XXX functions, such
as stdio and delay/ticks, which ports should provide definitions for. A
port will also provide mphalport.h with further HAL declarations.
2015-10-31 19:14:30 +03:00