Damien George
d689430e79
stmhal: Add SPI class.
Also some updates to compile with latest changes to core py.
11 years ago
Damien George
6e44381cce
stmhal: Improve RTC class; make fatfs use RTC for time stamping files.
11 years ago
Damien George
ed5117f6a8
stmhal: Add pyb.unique_id, to get unique id of MCU.
11 years ago
Damien George
44ee42de50
stmhal: Rename pyb.Led to pyb.LED to conform to naming rules.
It's Light Emitting Diode, so should be LED.
11 years ago
Damien George
8cf08a58a1
stmhal: Remove pyb.input (use sys.stdio.read(1) instead).
11 years ago
Damien George
a8f5d15fc6
stmhal: Update help and comments re gpio changing to Pin.
11 years ago
Damien George
c66d86c5ce
stmhal: Big cleanup; merge gpio into Pin; make names consistent.
This is an attempt to clean up the Micro Python API on the pyboard.
Gpio functionality is now in the Pin object, which seems more natural.
Constants for MODE and PULL are now in pyb.Pin. Names of some
classes have been adjusted to conform to CamelCase. Other
miscellaneous changes and clean up here and there.
11 years ago
Damien George
f6be480bda
stmhal: Add pyb.have_cdc function to check if USB CDC device is enabled.
11 years ago
Damien George
6dba016a56
stmhal: Add pyb.wfi() function (calls __WFI).
11 years ago
Damien George
0aab675108
stmhal: Little hack to dump GC allocation table using pyb.info().
Pass a single parameter (doesn't matter what): pyb.info(1), will dump
the GC alloc table.
11 years ago
Damien George
8b0535e23f
py: Change module globals from mp_map_t* to mp_obj_dict_t*.
Towards addressing issue #424 .
Had a small increase to ROM usage (order 60 bytes).
11 years ago
Damien George
df6567e634
Merge map.h into obj.h.
Pretty much everyone needs to include map.h, since it's such an integral
part of the Micro Python object implementation. Thus, the definitions
are now in obj.h instead. map.h is removed.
11 years ago
Damien George
038df43183
stmhal: Implement selector for USB device mode; improve boot up.
Can now choose at boot up whether the USB device is CDC+MSC or CDC+HID.
Choice is made by an option in boot.py, with default being CDC+MSC.
HID+MSC is not currently supported, but should be easy to implement.
Boot up now has ability to change the reset mode: hold down USR switch
while booting and LEDs will count from 1 to 7 to indicate the boot mode.
Release USR when correct mode is selected. Current modes are 1 (normal
boot), 2 (safe mode), 3 (reset FS mode).
11 years ago
Damien George
64563e39b3
stmhal: Add CDC+HID USB device.
The HID device must appear before the CDC in order for both to work at
the same time.
Whilst the code is working, it's not currently used.
11 years ago
Damien George
c9fd6645b0
stmhal: Factor out stdio and readline to separate files.
Adds readline_init() to clear readline history on soft reset. Addresses
issue #387 .
11 years ago
Damien George
38f0c607b0
stmhal: Change Usart creation function to class make_new.
11 years ago
Damien George
3021632501
stmhal: Shuffle around some init functions in main().
11 years ago
Damien George
6cfda3084d
stmhal: Add I2C support; change accel driver to use new I2C.
11 years ago
Damien George
caac542b23
Proper support for registering builtin modules in ROM.
Comes with some refactoring of code and renaming of files. All modules
are now named mod*.[ch].
11 years ago
Damien George
da5e269e51
stmhal: Make pyb.ADC the ADC class (not a function).
11 years ago
Dave Hylands
1403298a65
stmhal - fixed up adc stuff
Added support for the ADC channels and mappings to make_pins.py
I'm not sure if the hal properly deals with the channel 16/18 differences
between the 40x and 42x. It seems to deal with it partially. This particular
aspect will need testing on a 42x or 43x.
11 years ago
Damien George
b13492f8ad
stmhal: Add DAC driver.
11 years ago
Damien George
0e9d96f18f
stmhal: Make Led, Servo and Accel their class, not a function.
11 years ago
Damien George
9050b2ee33
stmhal: Improved interface to accelerometer.
11 years ago
Damien George
02fa035800
stmhal: Add input() and pyb.input() functions.
11 years ago
Damien George
626f6b8133
stmhal: Add servo driver.
11 years ago
Damien George
684164a8cf
stmhal: Add PYBv10 config; add RNG support.
11 years ago
Damien George
f78d9b1a72
stmhal: Add accelerometer driver; fix bug with LFN.
11 years ago
Damien George
b92d3e1fde
stmhal: Add fatfs support, working with flash and SD card.
11 years ago
Damien George
fb431bf556
stmhal: Add SD card support.
Just low-level read/write support. No filesystem yet.
11 years ago
Dave Hylands
9c122029ec
stmhal - Add usart support
11 years ago
Damien George
8b96af6907
stmhal: Get RTC working.
11 years ago
Dave Hylands
ca5444e6cd
stmhal - add pin mapping, gpio, exti, usrsw
11 years ago
Dave Hylands
0a64c92a9c
stmhal - add led support. Add netduino_plus_2 support
Tweaked a couple of the USB files to compile if neither dev nor host was defined.
Tested on netduiono plus 2 and stm32f4discovery boards
11 years ago
Dave Hylands
9db719bb57
stmhal - More systick cleanup. Fix HAL_Delay
11 years ago
Dave Hylands
f14b92b9e1
REPl working on UART6 with STMHAL
11 years ago
Damien George
c3d35c6ac7
stm: Put pyb module in ROM.
11 years ago