Damien George
f6be480bda
stmhal: Add pyb.have_cdc function to check if USB CDC device is enabled.
2014-04-16 15:52:50 +01:00
Damien George
9388a90842
stmhal: Fix USB CDC buffer overrun error.
...
Need to wait for the low-level USB driver to send the data over the USB
in-endpoint before the buffer can be used again. This patch adds a
check for this.
2014-04-16 15:51:27 +01:00
Damien George
bda2f70964
Merge pull request #498 from lurch/create-headers-from-files
...
Auto-generate the stmhal/pybcdc_inf header file from static files
2014-04-16 10:54:16 +01:00
Damien George
1381146382
stmhal: Fix C bindings of I2C.read/write.
2014-04-16 10:43:03 +01:00
Andrew Scheller
1452221aca
Auto-generate the stmhal/pybcdc_inf header file from static files
...
The USB VID&PID are automatically extracted from usbd_desc_cdc_msc.c
and inserted into pybcdc_inf.template, ensuring that the same USB
IDs get used everywhere
2014-04-16 02:41:26 +01:00
Damien George
2822d4e6ce
stmhal: Add I2C functions for pure master read/write.
2014-04-16 00:27:14 +01:00
Damien George
d5323f07ff
Merge pull request #496 from dhylands/fix-debug-usart
...
Fix call to enable pyb_usart_global_debug.
2014-04-15 21:25:27 +01:00
Dave Hylands
00adf67179
Fix call to enable pyb_usart_global_debug.
2014-04-15 12:20:31 -07:00
Damien George
9699ea6a2f
stmhal: Fix USB MSC so that it unmounts correctly on Mac OS X.
...
Mac OS X sends a SCSI command to remove the medium when it unmounts a
drive. If this command is not honoured, then OS X will automatically
remount the drive, making it impossible to eject. This patch disables
the USB MSC when the right SCSI command is sent.
2014-04-15 19:56:32 +01:00
Damien George
4d7f4eb6a9
stmhal: Add ADC function to read data at a given frequency.
...
Reads ADC values into a bytearray (or similar) at a fixed rate. Needs a
better name and improved API. Also fix up DAC dma function (which also
needs a better name and API).
2014-04-15 19:52:56 +01:00
Damien George
e95da5b784
stmhal: Add I2C.scan method, to scan all devices on the bus.
...
Simple way to find the address of an attached I2C device.
2014-04-15 19:24:13 +01:00
Damien George
f6d25ecf7b
stmhal: Add simple README.txt to freshly-created filesystem.
2014-04-15 19:20:25 +01:00
Damien George
c13d0b3304
stmhal: Wrap skin-named-usarts in PYBV10 #if.
2014-04-15 11:52:47 +01:00
Damien George
cce7119a2b
stmhal: Work around crazy bug in USB CDC.
...
Packets of 64 bytes length are not send to the host until the following
packet is sent. Fixed by never sending packets of 64 bytes length.
2014-04-14 01:46:25 +01:00
Damien George
7e5be0b1b4
stmhal: Improved usart module a bit.
2014-04-14 01:45:58 +01:00
Damien George
6dba016a56
stmhal: Add pyb.wfi() function (calls __WFI).
2014-04-14 01:45:24 +01:00
Damien George
86a03044e3
stmhal: Add stdin/stdout/stderr objects.
...
Available via sys.std{in,out,err}. Basic reading and writing supported.
Even sys.stdin.readline!
2014-04-13 19:00:56 +01:00
Damien George
212f89e61a
stmhal: Improve USB CDC write function (increase timeout).
2014-04-13 16:39:04 +01:00
Damien George
73496fbbe4
py: Fix up source-line calculation.
...
Should address issue #475 .
2014-04-13 14:51:56 +01:00
Damien George
cb861a5c6a
stm[hal]: Init mp_sys_path and mp_sys_argv correctly.
2014-04-13 13:19:09 +01:00
Damien George
640e7e4779
Merge pull request #476 from pfalcon/static-sys
...
Convert sys module to static allocation
2014-04-13 12:52:39 +01:00
Damien George
8a1cab952f
py: Fix mp_get_buffer, and use it in more places.
...
Must use mp_obj_get_type to get the type of an object. Can't assume
mp_obj_t is castable to mp_obj_base_t.
2014-04-13 12:08:52 +01:00
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.
2014-04-13 11:10:58 +01:00
Paul Sokolovsky
4165cd1c0c
stmhal: Update for static mod sys.
2014-04-13 07:02:57 +03:00
Damien George
82c7b1b1d5
stmhal: Put a USB structure in ROM; GC doesn't scan the data segment.
2014-04-12 18:50:20 +01:00