In order to have more fine-grained control over how builtin functions are
constructed, the MP_DECLARE_CONST_FUN_OBJ macros are made more specific,
with suffix of _0, _1, _2, _3, _VAR, _VAR_BETEEN or _KW. These names now
match the MP_DEFINE_CONST_FUN_OBJ macros.
In particular, this makes the L4 .isr_vector section 16K in size so it's
the same as the F4/F7 MCUs. The patch also moves the L4 filesystem to
the end of flash, which allows for 512K filesystem on the 1Mb devices
like the STM32L476DISC.
The delay_half parameter must be specified by the port to set up the
timing of the software SPI. This allows the port to adjust the timing
value to better suit its timing characteristics, as well as provide a
more accurate printing of the baudrate.
It's simpler to just default to always using software SPI if no specific
peripheral id/name is given. To use hardware SPI users must specify a
hardware peripheral id as the first parameter to the SPI constructor.
There is no need to take src_len and dest_len arguments. The case of
reading-only with a single output byte (originally src_len=1, dest_len>1)
is now handled by using the output buffer as the input buffer, and using
memset to fill the output byte into this buffer. This simplifies the
implementations of the spi_transfer protocol function.
To reset the flags we should write to the single bit only, not the entire
register (otherwise all other settings in the register are cleared).
Fixes#2457.
UART1 can be used even if the switch is enabled. The schematics for this
board make I2C1 available on PB8/PB9, even though it can also be mapped
to PB6/PB7.
See #2396 and #2427.
If a user tries to call `swint()` while interrupt is disabled the flag in
SWIER is set but the interrupt is not triggered and therefore the SWIER bit
is not cleared. When the interrupt is again enabled the next call to
`swint()` won't trigger the IRQ because a 0 to 1 transition will not occur.
The LCD interface library fails to deassert the chip select of the LCD
after an SPI transmission. Consequently using the SPI with other
peripherals disturbs the state of the LCD. This patch changes
lcd.lcd_out() to deassert CS after each transmission to the LCD.
machine.POWER_ON is renamed to machine.PWRON_RESET to match other
reset-cause constants that all end in _RESET. The cc3200 port keeps a
legacy definition of POWER_ON for backwards compatibility.