Commit Graph

78 Commits

Author SHA1 Message Date
dean 008799dc52 DM: adding mixer gain 2018-10-31 18:27:08 -04:00
Nick Moore b714f5d650 Add "dhcp" property to turn DHCP on and off 2018-10-25 11:29:27 +11:00
Nick Moore 06894be294 timer ticks for DHCP state machine for wiznet 2018-10-16 23:10:18 +11:00
Nick Moore 45974978ef fixup 2018-10-16 23:09:55 +11:00
Nick Moore a15f3361aa add mechanism for timer ticks in NICs 2018-10-16 23:09:25 +11:00
Nick Moore 1f760bded8 header file cleanup for wiznet 2018-10-16 23:07:58 +11:00
Nick Moore a4a0cf826b fix doc comments, translations again 2018-10-11 17:02:29 +11:00
Nick Moore bb239052ea Split wiznet driver into shared-bindings vs shared-module 2018-10-11 15:05:25 +11:00
Nick Moore aab28748bb Merge remote-tracking branch 'origin/master' into circuitpython/nickzoic/703-wiznet-5500-native 2018-10-11 14:19:10 +11:00
Nick Moore 823ff779ca network module c api into shared-module 2018-10-11 14:02:18 +11:00
Scott Shawcroft 6da25c8893
Rename stop to stop_voice in case we want stop to stop everything later. 2018-10-09 13:28:00 -07:00
Nick Moore 9b36d33df1 move random mac address function into network module 2018-10-09 13:12:04 +11:00
Nick Moore 6e624b9c6a Split wiznet.WIZNET5K off into its own file 2018-10-09 13:05:58 +11:00
Scott Shawcroft 3c6812f2c1
Fix M0 math 2018-10-05 15:19:09 -07:00
Scott Shawcroft 8587d8edf0
Fix voice ending in the middle of a buffer. 2018-10-05 15:19:08 -07:00
Scott Shawcroft 76008ce304
Introduce audioio.Mixer which can mix multiple audio samples
to produce a single sample.

Only works with 16 bit samples on the M4.

Fixes #987
2018-10-05 15:12:23 -07:00
Nick Moore d33f6214f1 modify modnetwork and modusocket for circuitpython 2018-10-04 22:02:25 +10:00
Nick Moore 3c32d046bf Copy wiznet module across from MicroPython 2018-10-04 21:22:09 +10:00
Scott Shawcroft 75d497bcc8
More explicit init in Group 2018-09-13 10:42:12 -07:00
Scott Shawcroft f21cf15c38
Add OnDiskBitmap which loads pixel data straight from disk.
Also, renamed Sprite's palette to pixel_shader so it can be
anything that produces colors based on values (including color values).
Added a ColorConverter that converts RGB888 (found in bitmaps) to
RGB565 for the display.

Fixes #1182
2018-09-12 15:25:59 -07:00
Scott Shawcroft 1683eb913d
Minor tweaks based on feedback 2018-09-06 14:49:49 -07:00
Scott Shawcroft 121903b6ee
Tweaks based on feedback 2018-08-31 14:21:48 -07:00
Scott Shawcroft 6697544cdf
Introduce displayio to render graphics to displays.
It's designed to minimize RAM footprint by using Sprites to
represent objects on the screen. The object model also facilitates
partial screen updating which reduces the bandwidth needed to display.

This is all handled in C. Python simply manipulates the objects with
the ability to synchronize to frame timing.
2018-08-31 12:31:52 -07:00
Scott Shawcroft de5a9d72dc
Compress all translated strings with Huffman coding.
This saves code space in builds which use link-time optimization.
The optimization drops the untranslated strings and replaces them
with a compressed_string_t struct. It can then be decompressed to
a c string.

Builds without LTO work as well but include both untranslated
strings and compressed strings.

This work could be expanded to include QSTRs and loaded strings if
a compress method is added to C. Its tracked in #531.
2018-08-16 17:40:57 -07:00
Scott Shawcroft 933add6cd8
Support internationalisation. 2018-08-07 14:58:57 -07:00
Dan Halbert 761f9a938e
Merge pull request #1075 from tannewt/more_mp_raise
Use more mp_raise_* to save 28 bytes code size.
2018-07-31 19:09:10 -04:00
Scott Shawcroft 0bf999f52a
Use more mp_raise_* to save 28 bytes code size. 2018-07-31 13:50:48 -07:00
Dan Halbert bc760dd341 WIP: complete manual inspection of all significant changes 2018-07-23 21:34:25 -04:00
Dan Halbert 2809b4f9dd Merge branch 'master' into micropython-25ae98f-merge 2018-07-16 19:36:40 -04:00
Dan Halbert a20ab40ed2 Merge 3.0.0 final bugfixes and changes to master 2018-07-16 09:01:46 -04:00
Dan Halbert e2e01efa84 compiles and runs; hangs on import storage;storage.VfsFat.<tab> 2018-07-13 22:51:10 -04:00
Dan Halbert dbf1a2f7d5 allow '/' to be mounted on '/' from Python code 2018-06-21 09:24:40 -04:00
Dan Halbert f152889938 do not permit mounting over a directory or file with the same name as the mount point 2018-06-15 13:53:30 -04:00
Dan Halbert 327b0f76da fix os.listdir() when current dir is '/' 2018-06-15 10:51:03 -04:00
Dan Halbert e724bc1c4e Fix playing audio from SD card 2018-06-14 18:47:40 -04:00
Radomir Dopieralski b219ce6d37 Add gamepad_singleton to root pointers 2018-05-30 23:11:22 +02:00
Radomir Dopieralski 42e36a883b Remove volatile from the gamepad struct 2018-05-23 21:49:20 +02:00
Radomir Dopieralski 240678e714 Avoid uninitialized gamepad on exception
Raise exceptions before the gamepad_singleton is created.
Also, use mp_raise for creating the exceptions.
2018-05-23 21:39:06 +02:00
Radomir Dopieralski 52d05bbc37 Cache pullup state in gamepad
Don't check the pin's pull direction on every tick, instead cache it
at the beginning. Also avoid a "can't get pull of output pin" error
when one of the pins passed is in output mode.
2018-05-23 11:26:16 +02:00
Scott Shawcroft 9a2cda7fd3
Reformat the error message 2018-05-16 13:19:51 -05:00
Jerry Needell d9f1b1f5b7 remove #include py/nlr.h from I2C.c 2018-05-13 22:32:32 -04:00
Jerry Needell aa9309704b revise to use mp_raise_msg insead of nlr_raise.... 2018-05-13 22:21:05 -04:00
Jerry Needell d6c26942a5 add timeout keyword to I2C - for bitbangio - ignored for busio 2018-05-13 21:54:44 -04:00
Scott Shawcroft 28642ab10d Add audio output support!
This evolves the API from 2.x (and breaks it). Playback devices are now
separate from the samples themselves. This allows for greater playback
flexibility. Two sample sources are audioio.RawSample and audioio.WaveFile.
They can both be mono or stereo. They can be output to audioio.AudioOut or
audiobusio.I2SOut.

Internally, the dma tracking has changed from a TC counting block transfers
to an interrupt generated by the block event sent to the EVSYS. This reduces
the overhead of each DMA transfer so multiple can occure without using up TCs.

Fixes #652. Fixes #522. Huge progress on #263
2018-04-12 16:35:13 -07:00
Radomir Dopieralski 280374fa63 Respect pin's pull in gamepad
While it is traditional to have buttons on pins that are pulled up, and
have the button connect them to the ground, some CircuitPython boards
(notably the CPX) have the button pins pulled low and the button
connects them to VCC.

This patch makes the gamepad only change the pin's pull if it wasn't
already set when passed to the constructor, and also makes it consider
a button pressed when its value is the opposite of its pull.
2018-03-31 21:13:02 +02:00
Jeff Epler c08f5a3a00 Add storage.getmount to retrieve the mount object associated with a path 2018-03-27 21:28:18 -05:00
Jeff Epler 968763aa1d factor out storage_object_from_path 2018-03-27 21:28:18 -05:00
Jeff Epler 355bf8b553 Conditionally compile out nonstandard array/struct typecodes
.. defaulting to off for circuitpython-supported boards, on for others.

.. fixing up the tests that fail when it is turned off, so that they skip
instead of failing
2018-03-26 18:13:49 -05:00
Radomir Dopieralski 493c1452f3 _stage: use 16 bit for coordinates to support larger screens 2018-03-11 12:07:23 +01:00
dean 68309c3fac replace tabs with spaces 2018-02-05 10:44:29 -05:00