Compare commits

...

10 Commits
main ... 4.x

Author SHA1 Message Date
Scott Shawcroft
9637baec75
Merge pull request #3080 from sommersoft/4.x
[4.x] Custom CSS For "Viewing Outdated Docs" Message
2020-06-29 15:51:20 -07:00
sommersoft
2d77c962a8 add custom css for 'viewing-old-docs' message 2020-06-26 14:42:20 -05:00
Dan Halbert
d4bb108e3b
Merge pull request #2401 from adafruit/4.1.x
merge 4.1.x into 4.x
2019-12-17 15:53:06 -05:00
Dan Halbert
8d4384814a
Merge pull request #2398 from jepler/excluded-mpy-subdirs-4.x
preprocess_frozen_modules: exclude subdirs of examples, docs, tests
2019-12-17 12:32:26 -05:00
Jeff Epler
1719a14cf0 preprocess_frozen_modules: exclude subdirs of examples, docs, tests
.. this reclaims several kB on CPX, where we really need it.
2019-12-17 10:01:33 -06:00
Scott Shawcroft
c8eee68fa0
Merge pull request #2153 from jepler/issue2146-4x
nRF: PWMOut: At deinit, make pin available again
2019-09-13 19:02:56 -07:00
jepler
251c0f5507 nRF: PWMOut: At deinit, make pin available again
Closes: #2146
2019-09-13 12:30:06 -05:00
Dan Halbert
67d2e888c3
Merge pull request #2102 from dhalbert/4.x-dotstar-fix
Fix status DotStar writes: fixes DotStar issues on PyRulers
2019-09-02 08:18:27 -04:00
Dan Halbert
6001b64a8a Fix status DotStar writing 2019-09-01 23:50:21 -04:00
Dan Halbert
8e14522b99
Merge pull request #2093 from tannewt/4.x
Update 4.x to 4.1.0 so that ReadTheDocs has the latest
2019-08-29 18:48:15 -04:00
5 changed files with 38 additions and 13 deletions

View File

@ -350,3 +350,6 @@ texinfo_documents = [
intersphinx_mapping = {"cpython": ('https://docs.python.org/3/', None),
"bus_device": ('https://circuitpython.readthedocs.io/projects/busdevice/en/latest/', None),
"register": ('https://circuitpython.readthedocs.io/projects/register/en/latest/', None)}
def setup(app):
app.add_stylesheet("customstyle.css")

View File

@ -10,6 +10,19 @@
}
/* custom CSS to sticky the ' viewing outdated version'
warning
*/
.document > .admonition {
position: sticky;
top: 0px;
background-color: salmon;
z-index: 2;
}
body {
overflow-x: unset!important;
}
/* override table width restrictions */
@media screen and (min-width: 767px) {

View File

@ -233,6 +233,9 @@ void common_hal_pulseio_pwmout_deinit(pulseio_pwmout_obj_t* self) {
// Disconnect pin from channel.
pwm->PSEL.OUT[self->channel] = 0xFFFFFFFF;
reset_pin_number(self->pin_number);
self->pin_number = NO_PIN;
for(int i=0; i < CHANNELS_PER_PWM; i++) {
if (self->pwm->PSEL.OUT[i] != 0xFFFFFFFF) {
// Some channel is still being used, so don't disable.

View File

@ -39,7 +39,10 @@ static digitalio_digitalinout_obj_t status_neopixel;
#if defined(MICROPY_HW_APA102_MOSI) && defined(MICROPY_HW_APA102_SCK)
uint8_t rgb_status_brightness = 255;
static uint8_t status_apa102_color[12] = {0, 0, 0, 0, 0xff, 0, 0, 0};
#define APA102_BUFFER_LENGTH 12
static uint8_t status_apa102_color[APA102_BUFFER_LENGTH] = {0, 0, 0, 0, 0xff, 0, 0, 0, 0xff, 0xff, 0xff, 0xff};
#ifdef CIRCUITPY_BITBANG_APA102
#include "shared-bindings/bitbangio/SPI.h"
#include "shared-module/bitbangio/types.h"
@ -104,10 +107,12 @@ void rgb_led_status_init() {
apa102_sck_in_use = false;
#ifdef CIRCUITPY_BITBANG_APA102
shared_module_bitbangio_spi_try_lock(&status_apa102);
shared_module_bitbangio_spi_configure(&status_apa102, 100000, 0, 1, 8);
// Use 1MHz for clock rate. Some APA102's are spec'd 800kHz-1200kHz,
// though many can run much faster. bitbang will probably run slower.
shared_module_bitbangio_spi_configure(&status_apa102, 1000000, 0, 0, 8);
#else
common_hal_busio_spi_try_lock(&status_apa102);
common_hal_busio_spi_configure(&status_apa102, 100000, 0, 1, 8);
common_hal_busio_spi_configure(&status_apa102, 1000000, 0, 0, 8);
#endif
#endif
@ -186,9 +191,9 @@ void new_status_color(uint32_t rgb) {
status_apa102_color[7] = (rgb_adjusted >> 16) & 0xff;
#ifdef CIRCUITPY_BITBANG_APA102
shared_module_bitbangio_spi_write(&status_apa102, status_apa102_color, 8);
shared_module_bitbangio_spi_write(&status_apa102, status_apa102_color, APA102_BUFFER_LENGTH);
#else
common_hal_busio_spi_write(&status_apa102, status_apa102_color, 8);
common_hal_busio_spi_write(&status_apa102, status_apa102_color, APA102_BUFFER_LENGTH);
#endif
#endif
@ -229,11 +234,11 @@ void temp_status_color(uint32_t rgb) {
if (apa102_mosi_in_use || apa102_sck_in_use) {
return;
}
uint8_t colors[12] = {0, 0, 0, 0, 0xff, rgb_adjusted & 0xff, (rgb_adjusted >> 8) & 0xff, (rgb_adjusted >> 16) & 0xff, 0x0, 0x0, 0x0, 0x0};
uint8_t colors[APA102_BUFFER_LENGTH] = {0, 0, 0, 0, 0xff, rgb_adjusted & 0xff, (rgb_adjusted >> 8) & 0xff, (rgb_adjusted >> 16) & 0xff, 0xff, 0xff, 0xff, 0xff};
#ifdef CIRCUITPY_BITBANG_APA102
shared_module_bitbangio_spi_write(&status_apa102, colors, 12);
shared_module_bitbangio_spi_write(&status_apa102, colors, APA102_BUFFER_LENGTH);
#else
common_hal_busio_spi_write(&status_apa102, colors, 12);
common_hal_busio_spi_write(&status_apa102, colors, APA102_BUFFER_LENGTH);
#endif
#endif
#if defined(CP_RGB_STATUS_LED)
@ -265,9 +270,9 @@ void clear_temp_status() {
#endif
#if defined(MICROPY_HW_APA102_MOSI) && defined(MICROPY_HW_APA102_SCK)
#ifdef CIRCUITPY_BITBANG_APA102
shared_module_bitbangio_spi_write(&status_apa102, status_apa102_color, 8);
shared_module_bitbangio_spi_write(&status_apa102, status_apa102_color, APA102_BUFFER_LENGTH);
#else
common_hal_busio_spi_write(&status_apa102, status_apa102_color, 8);
common_hal_busio_spi_write(&status_apa102, status_apa102_color, APA102_BUFFER_LENGTH);
#endif
#endif
#if defined(CP_RGB_STATUS_LED)

View File

@ -34,6 +34,7 @@ def copy_and_process(in_dir, out_dir):
# Skip library examples directories.
if Path(root).name in ['examples', 'docs', 'tests']:
del subdirs[:]
continue
for file in files: