Dave Hylands
ea8bf81058
stmhal: Replace #include "stm32f4xx_hal.h" with #include STM32_HAL_H.
9 years ago
Damien George
f243851ccd
stmhal: Expose uwTick in f7 hal.
9 years ago
Dave Hylands
7c934ae501
stmhal: Add hal and cmsis files from STM32Cube_FW_F7_V1.1.0.
All files were converted to linux line endings.
All trailing whitespace was removed using:
for f in f7/inc/* f7/src/*; do sed --in-place 's/[[:space:]]\+$//' $f; done
All non-ascii chars in comments were replaced with ascii equivalents or
removed.
9 years ago
Damien George
f5d04750db
stmhal: Put fs_user_mount pointer in root ptr section of global state.
Should fix issue #1393 .
9 years ago
Damien George
92e9a5e0a7
stmhal: Check if user block device is mounted before accessing it.
In particular this fixes a bug where pyb.sync (and os.sync) fail because
they try to sync the user mounted device even if it's not mounted.
9 years ago
Tom Soulanille
7d588b0c7c
lib/mp-readline: Add emacs-style control characters for cursor movement.
Disabled by default. Adds 108 bytes to Thumb2 arch when enabled.
9 years ago
Damien George
7693ef3bd6
stmhal: Allow ADC.read_timed to take Timer object in place of freq.
This allows a user-specified Timer for the triggering of the ADC read,
mirroring the new behaviour of DAC.write_timed.
Addresses issue #1129 .
9 years ago
Damien George
99a21dc05d
stmhal: Add stm32fxxx_hal_i2s_ex.c to hal/f2 (dummy) and hal/f4.
9 years ago
Damien George
abc24c1876
stmhal: Allow DAC.write_timed to take Timer object in place of freq.
This allows the DAC to use a user-specified Timer for the triggering
(instead of the default Timer(6)), while still supporting original
behaviour.
Addresses issues #1129 and #1388 .
9 years ago
Damien George
6f5e0fe955
stmhal: Clean up DAC code a little.
9 years ago
blmorris
2af846e711
stmhal/boards/stm32fxx_prefix.c: Fix alt function number calculation
This prevented pin_find_af* functions from being able to find some
of the alternate functions in the pin struct
9 years ago
Damien George
f576057274
stmhal: Add CMSIS device header files for STM32F2xx series.
9 years ago
Wojtek Siudzinski
0621eca05e
stmhal: Add STM32CubeF2 version 1.1.0, in hal/f2 directory.
Only those files which are needed by the stmhal port are added.
Also includes a dummy file (stm32f2xx_hal_pcd_ex.c) to keep the build
system the same for f4 and f2 MCU series.
9 years ago
Damien George
a39df51d8a
stmhal: Update Makefile and board configs to compile with relocated hal.
9 years ago
Damien George
e4d43401eb
stmhal: Move HAL Cube files to f4/ subdir, keeping only those we use.
This is in preparation for supporting other MCU series, such as
STM32F2xx. Directory structure for the HAL is now hal/f4/{inc,src},
where "f4" will in the future be different for other series.
HAL source/header files that are not use are removed to reduce the size
of the code.
9 years ago
Dave Hylands
9309e609cd
stmhal: Add qstr definition for ifconfig when building for WizNet
9 years ago
Dave Hylands
11115e4d23
stmhal: Add I2S support to make-pins.py
9 years ago
Damien George
0807139c1d
stmhal: Add config option for storage to use second flash segment.
When enabled this allows the internal storage to be split over 2
contiguous regions of flash (two segments), and so the storage can be
increased.
This option is disabled by default, giving original behaviour.
10 years ago
blmorris
c5175526dd
stmhal/dma.c: Modify dma_init() to accept init struct as an argument
This removes hard-coded DMA init params from dma_init(), instead defining
these parameters in a DMA_InitTypeDef struct that gets passed as an
argument to dma_init()
This makes dma_init more generic so it can be used for I2S and SD Card,
which require different initialization parameters.
10 years ago
Damien George
6e1dfb0d1a
stmhal: Reorganise code for parsing keyword args in I2C methods.
To make it the same as SPI and UART.
10 years ago
Damien George
76285469d3
stmhal: Make I2C use DMA when interrupts are enabled.
10 years ago
Damien George
3d30d605f5
stmhal: Factor out DMA initialisation code from spi.c.
This is so that the DMA can be shared by multiple peripherals.
10 years ago
Damien George
0aa5e75000
stmhal: Break immediately from USB CDC busy wait loop if IRQs disabled.
If IRQs are disabled then the USB CDC buffer will never be
drained/filled and the sys-tick timer will never increase, so we should
not busy wait in this case.
10 years ago
Damien George
53a8aeb6e7
stmhal: Fix slow SPI DMA transfers by removing wfi from DMA wait loop.
Addresses issue #1268 .
10 years ago
Dave Hylands
3ac2d06bd1
stmhal: Add support for UART5
I tested this on my CERB40 board and it seems to be working fine.
10 years ago
Damien George
17d9b5006d
stmhal: Fix off-by-one error when checking for valid I2C and SPI bus.
10 years ago
Damien George
70446f46c2
stmhal: Allow to name SPI busses, and give them names for pyboard.
10 years ago
Damien George
0e6f5e08e1
stmhal: Allow to name I2C busses, and give them names for pyboard.
10 years ago
Damien George
1775b65e07
stmhal: Remove PYBVxx defines and use config vars for UART/CAN names.
Now all stmhal-based boards can name their peripherals (if they want) to
any string.
10 years ago
Damien George
3c4b5d4281
stmhal: Implement sys.std{in,out,err}.buffer, for raw byte mode.
It's configurable and only enabled for stmhal port.
10 years ago
Dave Hylands
968b7dd173
stmhal: Detect disk full condition
10 years ago
Damien George
0d31bbc7fa
stmhal: Make pendsv variable non-static so gcc-5 doesn't opt it away.
10 years ago
Kaspar Schleiser
f5dd6f7f37
py/binary: Make return type of mp_binary_get_size size_t instead of int.
Fixes sign-compare warning.
10 years ago
Damien George
1511dd4f84
stmhal: Add readinto and readlines methods to sys.stdin, pyb.USB_VCP().
Addresses issue #1255 .
10 years ago
Josef Gajdusek
1db4253886
lib: Move time utility functions to common library.
10 years ago
Steve Zatz
c7df9c6c47
stmhal: Add os.rename function.
10 years ago
Damien George
c50772d19f
py: Add mp_obj_get_int_truncated and use it where appropriate.
mp_obj_get_int_truncated will raise a TypeError if the argument is not
an integral type. Use mp_obj_int_get_truncated only when you know the
argument is a small or big int.
10 years ago
blmorris
5df81de7af
sthmal/rtc.c: Add calibration() method to get/set RTC fine-tuning value.
10 years ago
Dave Hylands
ff987ccf11
stmhal: Move debug UART repl to after uart_init0 call.
10 years ago
Damien George
c98c128fe8
pyexec: Make raw REPL work with event-driven version of pyexec.
esp8266 port now has working raw and friendly REPL, as well as working
soft reset (CTRL-D at REPL, or raise SystemExit).
tools/pyboard.py now works with esp8266 port.
10 years ago
Paul Sokolovsky
3d3ef36e97
modstruct: Rename module to "ustruct", to allow full Python-level impl.
10 years ago
Josef Gajdusek
04ee5983fe
lib: Move some common mod_network_* functions to lib/netutils.
10 years ago
Eero af Heurlin
2378be4e93
stmhal: Allow to configure UART pins completely via mpconfigboard.h.
10 years ago
Dave Hylands
c3e37a0cde
stmhal: Automatically re-enable IRQs on the USB REPL.
This allows errors to be seen and prevents hanging
the board from doing: pyb.disable_irq()
10 years ago
Damien George
b7a4f15b34
mp-readline: Save "prompt" string in readline state.
10 years ago
Damien George
95f53461c2
py: Replace py-version.sh with makeversionhdr.py, written in Python.
Also rename py-version.h to mpversion.h for consistency with mpconfig.h.
10 years ago
Dave Hylands
fdcb3b7ebb
stmhal: Actually disable unhandled timer interrupts.
10 years ago
Dave Hylands
fd787c5e4e
stmhal: Reset the timer counter to zero after changing the auto reload.
Because if the counter is above the new value of the auto-reload register
then it may be a long time until the timer wraps around.
10 years ago
Damien George
d8837cea6f
stmhal: Implement os.uname() to get details of OS and hardware.
10 years ago
Damien George
f35b5d28db
stmhal/pyexec.c: Make raw REPL mode 8-bit clean.
10 years ago