Browse Source

mimxrt: Extend the help() message and README.md.

pull/7927/head
robert-hh 3 years ago
committed by Damien George
parent
commit
c827d4b7ab
  1. 26
      ports/mimxrt/README.md
  2. 14
      ports/mimxrt/main.c

26
ports/mimxrt/README.md

@ -1,17 +1,31 @@
Port of MicroPython to NXP iMX RT 10xx
======================================
Currently supports Teensy 4.0 and the i.MX RT1010 EVK board.
Currently supports Teensy 4.0, Teensy 4.1, and the
MIMXRT1010_EVK, MIMXRT1020_EVK, MIMXRT1050_EVK, MIMXRT1060_EVK and
MIMXRT1064_EVK boards.
Features:
- REPL over USB VCP
- machine.ADC
- machine.I2C
- machine.LED
- machine.Pin
- machine.PWM
- machine.RTC
- machine.SDCard
- machine.SPI
- machine.Signal
- machine.SoftI2C
- machine.SoftSPI
- machine.Timer
- machine.UART
- LFS2 file system at the internal Flash
- SDCard support (not on MIMXRT1010_EVK)
- Ethernet (not on Teensy 4.0 and MIMXRT1010_EVK)
Known issues:
- pyboard.py doesn't work with files larger than 64 bytes
- machine.Pin class currently does not support GPIOMUX option of
i.MX RT101x variants
TODO:
- Enable TCM
- Peripherals (LED, Timers, etc)
- More peripherals (Counter, I2S, CAN, etc)
- More Python options

14
ports/mimxrt/main.c

@ -163,17 +163,25 @@ const char mimxrt_help_text[] =
" Pin pull modes are: Pin.PULL_UP, Pin.PULL_UP_47K, Pin.PULL_UP_22K, Pin.PULL_DOWN, Pin.PULL_HOLD\n"
" machine.ADC(pin) -- make an analog object from a pin\n"
" methods: read_u16()\n"
" machine.UART(id, baudrate=115200) -- create an UART object (id=1 - 8)\n"
" machine.UART(id, baudrate=115200) -- create an UART object (id=1 - 8, board-specific)\n"
" methods: init(), write(buf), any()\n"
" buf=read(n), readinto(buf), buf=readline()\n"
" The RX and TX pins are fixed and board-specific.\n"
" machine.SoftI2C() -- create an Soft I2C object\n"
" machine.SoftI2C() -- create a Soft I2C object\n"
" machine.I2C(id) -- create a HW I2C object\n"
" methods: readfrom(addr, buf, stop=True), writeto(addr, buf, stop=True)\n"
" readfrom_mem(addr, memaddr, arg), writeto_mem(addr, memaddr, arg)\n"
" machine.SoftSPI(baudrate=1000000) -- create an SPI object ()\n"
" SoftI2C allows to use any pin for sda and scl, HW I2C id's and pins are fixed\n"
" machine.SoftSPI(baudrate=1000000) -- create a Soft SPI object\n"
" machine.SPI(id, baudrate=1000000) -- create a HW SPI object\n"
" methods: read(nbytes, write=0x00), write(buf), write_readinto(wr_buf, rd_buf)\n"
" SoftSPI allows to use any pin for SPI, HW SPI id's and pins are fixed\n"
" machine.Timer(id, freq, callback) -- create a hardware timer object (id=0,1,2)\n"
" eg: machine.Timer(freq=1, callback=lambda t:print(t))\n"
" machine.RTC() -- create a Real Time Clock object\n"
" methods: init(), datetime([dateime_tuple]), now()\n"
" machine.PWM(pin, freq, duty_u16[, kw_opts]) -- create a PWM object\n"
" methods: init(), duty_u16([value]), duty_ns([value]), freq([value])\n"
"\n"
"Useful control commands:\n"
" CTRL-C -- interrupt a running program\n"

Loading…
Cancel
Save