summaryrefslogtreecommitdiff
path: root/ports/stm32/machine_i2c.c
AgeCommit message (Collapse)Author
2019-10-13remove ports/stm32Dan Halbert
2018-05-28stm32: Add support for STM32F0 MCUs.Damien George
2018-05-14stm32/machine_i2c: Use new F4 hardware I2C driver for machine.I2C class.Damien George
And remove the old one based on ST code.
2018-04-24stm32/machine_i2c: Provide hardware I2C for machine.I2C on F7 MCUs.Damien George
2018-04-24stm32: Rename legacy pyb.I2C helper functions to start with pyb_i2c_.Damien George
2018-03-28stm32: Change pin_X and pyb_pin_X identifiers to be pointers to objects.Damien George
Rather than pin objects themselves. The actual object is now pin_X_obj and defines are provided so that pin_X is &pin_X_obj. This makes it so that code that uses pin objects doesn't need to know if they are literals or objects (that need pointers taken) or something else. They are just entities that can be passed to the map_hal_pin_xxx functions. This mirrors how the core handles constant objects (eg mp_const_none which is &mp_const_none_obj) and allows for the possibility of different implementations of the pin layer. For example, prior to this patch there was the following: extern const pin_obj_t pin_A0; #define pyb_pin_X1 pin_A0 ... mp_hal_pin_high(&pin_A0); and now there is: extern const pin_obj_t pin_A0_obj; #define pin_A0 (&pin_A0_obj) #define pyb_pin_X1 pin_A0 ... mp_hal_pin_high(pin_A0); This patch should have minimal effect on board configuration files. The only change that may be needed is if a board has .c files that configure pins.
2018-03-27stm32: Consolidate include of genhdr/pins.h to single location in pin.h.Damien George
genhdr/pins.h is an internal header file that defines all of the pin objects and it's cleaner to have pin.h include it (where the struct's for these objects are defined) rather than an explicit include by every user.
2018-03-17stm32: Use STM32xx macros instead of MCU_SERIES_xx to select MCU type.Damien George
The CMSIS files for the STM32 range provide macros to distinguish between the different MCU series: STM32F4, STM32F7, STM32H7, STM32L4, etc. Prefer to use these instead of custom ones.
2018-03-07stm32/i2c: On F4 MCUs report the actual I2C SCL frequency.Damien George
2017-12-22stm32: Allow to build a board without any hardware I2C ports defined.Damien George
This patch adds in internal config value MICROPY_HW_ENABLE_HW_I2C that is automatically configured, and enabled only if one or more hardware I2C ports are defined in the mpconfigboard.h file. If none are defined then the pyb.I2C class is excluded from the build, along with all supporting code. The machine.I2C class will still be available for software I2C. Disabling all hardware I2C on an F4 board saves around 10,000 bytes of code and 200 bytes of RAM.
2017-09-06ports: Make new ports/ sub-directory and move all ports there.Damien George
This is to keep the top-level directory clean, to make it clear what is core and what is a port, and to allow the repository to grow with new ports in a sustainable way.