Wykres commitów

6 Commity (b833f170c324bd7b9f0c1623d539fb301e7f09a6)

Autor SHA1 Wiadomość Data
Damien George 5c320bd0b0 stm32: Introduce MICROPY_HW_ENABLE_USB and clean up USB config.
This patch allows to completely compile-out support for USB, and no-USB is
now the default.  If a board wants to enable USB it should define:

    #define MICROPY_HW_ENABLE_USB (1)

And then one or more of the following to select the USB PHY:

    #define MICROPY_HW_USB_FS (1)
    #define MICROPY_HW_USB_HS (1)
    #define MICROPY_HW_USB_HS_IN_FS (1)
2018-02-13 18:51:08 +11:00
Damien George 3eb0694b97 stm32: Update HAL macro and constant names to use newer versions.
Newer versions of the HAL use names which are cleaner and more
self-consistent amongst the HAL itself.  This patch switches to use those
names in most places so it is easier to update the HAL in the future.
2018-02-13 15:37:35 +11:00
Damien George d6bf3658f4 stm32: Make uos.dupterm() conform to specs by using extmod version.
The legacy function pyb.repl_uart() is still provided and retains its
original behaviour (it only accepts a UART object).  uos.dupterm() will now
accept any object with write/readinto methods.  At the moment there is just
1 dupterm slot.
2017-10-19 14:16:42 +11:00
Damien George 0eb333e3cf stm32/mphalport: Improve efficiency of mp_hal_stdout_tx_strn_cooked.
Also simplifies the code by removing the specialised (and inefficient)
cooked functions from UART and USB_VCP.
2017-10-19 14:15:32 +11:00
Damien George a3dc1b1957 all: Remove inclusion of internal py header files.
Header files that are considered internal to the py core and should not
normally be included directly are:
    py/nlr.h - internal nlr configuration and declarations
    py/bc0.h - contains bytecode macro definitions
    py/runtime0.h - contains basic runtime enums

Instead, the top-level header files to include are one of:
    py/obj.h - includes runtime0.h and defines everything to use the
        mp_obj_t type
    py/runtime.h - includes mpstate.h and hence nlr.h, obj.h, runtime0.h,
        and defines everything to use the general runtime support functions

Additional, specific headers (eg py/objlist.h) can be included if needed.
2017-10-04 12:37:50 +11:00
Damien George 01dd7804b8 ports: Make new ports/ sub-directory and move all ports there.
This is to keep the top-level directory clean, to make it clear what is
core and what is a port, and to allow the repository to grow with new ports
in a sustainable way.
2017-09-06 13:40:51 +10:00