Skip to content

Commit

Permalink
mimxrt/main: Extend the information returned by help().
Browse files Browse the repository at this point in the history
  • Loading branch information
robert-hh authored and dpgeorge committed Jun 26, 2021
1 parent 4eabff5 commit c8284c9
Showing 1 changed file with 17 additions and 2 deletions.
19 changes: 17 additions & 2 deletions ports/mimxrt/main.c
Expand Up @@ -131,8 +131,23 @@ const char mimxrt_help_text[] =
" machine.Pin(pin, m, [p]) -- get a pin and configure it for IO mode m, pull mode p\n"
" methods: init(..), value([v]), high(), low())\n"
"\n"
"Pin IO modes are: Pin.IN, Pin.OUT, Pin.OPEN_DRAIN\n"
"Pin pull modes are: Pin.PULL_UP, Pin.PULL_UP_47K, Pin.PULL_UP_22K, Pin.PULL_DOWN, Pin.PULL_HOLD\n"
" Pins are numbered board specific, either 0-n, or 'D0'-'Dn', or 'A0' - 'An',\n"
" according to the boards's pinout sheet.\n"
" Pin IO modes are: Pin.IN, Pin.OUT, Pin.OPEN_DRAIN\n"
" 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"
" 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"
" 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"
" methods: read(nbytes, write=0x00), write(buf), write_readinto(wr_buf, rd_buf)\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"
"\n"
"Useful control commands:\n"
" CTRL-C -- interrupt a running program\n"
Expand Down

0 comments on commit c8284c9

Please sign in to comment.