2014-05-03 22:27:38 +00:00
|
|
|
/*
|
|
|
|
* This file is part of the Micro Python project, http://micropython.org/
|
|
|
|
*
|
|
|
|
* The MIT License (MIT)
|
|
|
|
*
|
|
|
|
* Copyright (c) 2013, 2014 Damien P. George
|
|
|
|
*
|
|
|
|
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
|
|
* of this software and associated documentation files (the "Software"), to deal
|
|
|
|
* in the Software without restriction, including without limitation the rights
|
|
|
|
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
|
|
* copies of the Software, and to permit persons to whom the Software is
|
|
|
|
* furnished to do so, subject to the following conditions:
|
|
|
|
*
|
|
|
|
* The above copyright notice and this permission notice shall be included in
|
|
|
|
* all copies or substantial portions of the Software.
|
|
|
|
*
|
|
|
|
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
|
|
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
|
|
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
|
|
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
|
|
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
|
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
|
|
* THE SOFTWARE.
|
|
|
|
*/
|
|
|
|
|
2014-03-13 01:06:26 +00:00
|
|
|
// qstrs specific to this port
|
|
|
|
|
|
|
|
Q(help)
|
|
|
|
Q(pyb)
|
2015-10-08 04:26:04 +00:00
|
|
|
Q(machine)
|
2014-04-19 00:28:18 +00:00
|
|
|
Q(unique_id)
|
2014-05-18 09:56:21 +00:00
|
|
|
Q(bootloader)
|
2014-10-22 06:04:38 +00:00
|
|
|
Q(hard_reset)
|
2014-03-13 01:06:26 +00:00
|
|
|
Q(info)
|
|
|
|
Q(sd_test)
|
2014-03-26 20:15:40 +00:00
|
|
|
Q(present)
|
|
|
|
Q(power)
|
2014-04-14 00:45:24 +00:00
|
|
|
Q(wfi)
|
2014-04-18 21:38:09 +00:00
|
|
|
Q(disable_irq)
|
|
|
|
Q(enable_irq)
|
2015-10-08 04:26:04 +00:00
|
|
|
Q(reset)
|
2014-03-13 01:06:26 +00:00
|
|
|
Q(stop)
|
|
|
|
Q(standby)
|
2015-10-08 04:26:04 +00:00
|
|
|
Q(idle)
|
|
|
|
Q(deepsleep)
|
2014-03-13 01:06:26 +00:00
|
|
|
Q(main)
|
2015-08-22 17:11:02 +00:00
|
|
|
Q(opt)
|
2014-03-13 01:06:26 +00:00
|
|
|
Q(sync)
|
|
|
|
Q(gc)
|
|
|
|
Q(repl_info)
|
|
|
|
Q(delay)
|
|
|
|
Q(udelay)
|
|
|
|
Q(servo)
|
|
|
|
Q(pwm)
|
2014-03-26 20:15:40 +00:00
|
|
|
Q(read)
|
2014-04-03 17:32:54 +00:00
|
|
|
Q(readall)
|
|
|
|
Q(readline)
|
2014-03-26 20:15:40 +00:00
|
|
|
Q(write)
|
2014-06-15 08:47:27 +00:00
|
|
|
Q(repl_uart)
|
2014-03-13 01:06:26 +00:00
|
|
|
Q(time)
|
2014-03-22 13:41:02 +00:00
|
|
|
Q(rng)
|
2014-03-13 01:06:26 +00:00
|
|
|
Q(SD)
|
|
|
|
Q(SDcard)
|
2014-04-08 01:08:16 +00:00
|
|
|
Q(FileIO)
|
2014-07-19 15:39:13 +00:00
|
|
|
Q(flush)
|
2015-02-10 22:27:47 +00:00
|
|
|
Q(boot.py)
|
|
|
|
Q(main.py)
|
2014-03-13 01:06:26 +00:00
|
|
|
// Entries for sys.path
|
2014-07-31 22:44:04 +00:00
|
|
|
Q(/flash)
|
|
|
|
Q(/flash/lib)
|
|
|
|
Q(/sd)
|
|
|
|
Q(/sd/lib)
|
2014-04-18 21:38:09 +00:00
|
|
|
Q(millis)
|
2014-08-23 19:21:12 +00:00
|
|
|
Q(micros)
|
2014-09-28 18:21:13 +00:00
|
|
|
Q(elapsed_millis)
|
|
|
|
Q(elapsed_micros)
|
2014-04-18 21:38:09 +00:00
|
|
|
|
2014-12-27 20:20:51 +00:00
|
|
|
// for user-mountable block devices
|
|
|
|
Q(mount)
|
|
|
|
Q(readonly)
|
|
|
|
Q(mkfs)
|
|
|
|
Q(readblocks)
|
|
|
|
Q(writeblocks)
|
|
|
|
Q(sync)
|
|
|
|
Q(count)
|
|
|
|
|
2014-10-12 19:23:47 +00:00
|
|
|
// for module weak links
|
2014-12-24 16:24:42 +00:00
|
|
|
Q(binascii)
|
2014-10-12 19:23:47 +00:00
|
|
|
Q(re)
|
2014-10-12 22:35:38 +00:00
|
|
|
Q(zlib)
|
2014-10-12 19:23:47 +00:00
|
|
|
Q(json)
|
2014-11-27 17:54:37 +00:00
|
|
|
Q(heapq)
|
|
|
|
Q(hashlib)
|
2014-10-12 19:23:47 +00:00
|
|
|
|
2015-02-03 22:37:50 +00:00
|
|
|
// for USB configuration
|
|
|
|
Q(usb_mode)
|
|
|
|
Q(mode)
|
|
|
|
Q(vid)
|
|
|
|
Q(pid)
|
|
|
|
Q(hid)
|
|
|
|
Q(hid_mouse)
|
|
|
|
Q(hid_keyboard)
|
|
|
|
|
2015-08-30 21:20:38 +00:00
|
|
|
// for usb modes
|
|
|
|
Q(host)
|
|
|
|
Q(VCP)
|
|
|
|
Q(MSC)
|
|
|
|
Q(HID)
|
|
|
|
Q(MSC+HID)
|
|
|
|
Q(VCP+MSC)
|
|
|
|
Q(VCP+HID)
|
|
|
|
// CDC is a synonym for VCP for backwards compatibility
|
|
|
|
Q(CDC)
|
|
|
|
Q(CDC+MSC)
|
|
|
|
Q(CDC+HID)
|
|
|
|
|
2014-07-31 09:30:42 +00:00
|
|
|
// for USB VCP class
|
|
|
|
Q(USB_VCP)
|
2014-11-29 15:23:21 +00:00
|
|
|
Q(setinterrupt)
|
2014-11-01 21:26:06 +00:00
|
|
|
Q(isconnected)
|
|
|
|
Q(have_cdc)
|
|
|
|
Q(any)
|
2014-07-31 09:30:42 +00:00
|
|
|
Q(send)
|
|
|
|
Q(recv)
|
|
|
|
Q(timeout)
|
|
|
|
|
2014-11-01 21:26:06 +00:00
|
|
|
// for USB HID class
|
|
|
|
Q(USB_HID)
|
|
|
|
Q(any)
|
|
|
|
Q(send)
|
|
|
|
Q(recv)
|
|
|
|
|
2014-04-19 01:17:30 +00:00
|
|
|
// for RTC class
|
|
|
|
Q(RTC)
|
|
|
|
Q(info)
|
|
|
|
Q(datetime)
|
2015-03-15 17:15:55 +00:00
|
|
|
Q(wakeup)
|
2015-05-07 17:18:52 +00:00
|
|
|
Q(calibration)
|
2014-04-19 01:17:30 +00:00
|
|
|
|
2014-04-18 21:38:09 +00:00
|
|
|
// for Pin class
|
2014-03-13 01:06:26 +00:00
|
|
|
Q(Pin)
|
|
|
|
Q(PinAF)
|
|
|
|
Q(PinNamed)
|
2014-04-19 01:17:57 +00:00
|
|
|
Q(init)
|
2014-04-18 21:38:09 +00:00
|
|
|
Q(value)
|
2015-10-19 21:48:21 +00:00
|
|
|
Q(alt)
|
2014-04-18 21:38:09 +00:00
|
|
|
Q(low)
|
|
|
|
Q(high)
|
|
|
|
Q(name)
|
2014-07-22 14:57:36 +00:00
|
|
|
Q(names)
|
|
|
|
Q(af)
|
|
|
|
Q(af_list)
|
2014-04-18 21:38:09 +00:00
|
|
|
Q(port)
|
|
|
|
Q(pin)
|
2014-07-22 14:57:36 +00:00
|
|
|
Q(gpio)
|
2014-04-18 21:38:09 +00:00
|
|
|
Q(mapper)
|
|
|
|
Q(dict)
|
|
|
|
Q(debug)
|
|
|
|
Q(board)
|
|
|
|
Q(cpu)
|
2014-07-22 14:57:36 +00:00
|
|
|
Q(af)
|
|
|
|
Q(mode)
|
|
|
|
Q(pull)
|
|
|
|
Q(index)
|
|
|
|
Q(reg)
|
2014-04-18 21:38:09 +00:00
|
|
|
Q(IN)
|
2015-10-19 21:48:21 +00:00
|
|
|
Q(OUT)
|
|
|
|
Q(OPEN_DRAIN)
|
|
|
|
Q(ALT)
|
|
|
|
Q(ALT_OPEN_DRAIN)
|
|
|
|
Q(ANALOG)
|
|
|
|
Q(PULL_UP)
|
|
|
|
Q(PULL_DOWN)
|
2014-04-18 21:38:09 +00:00
|
|
|
Q(OUT_PP)
|
|
|
|
Q(OUT_OD)
|
|
|
|
Q(AF_PP)
|
|
|
|
Q(AF_OD)
|
2014-03-13 01:06:26 +00:00
|
|
|
Q(PULL_NONE)
|
2014-03-22 14:56:32 +00:00
|
|
|
|
2014-04-18 23:54:33 +00:00
|
|
|
// for LED object
|
|
|
|
Q(LED)
|
2014-03-26 20:15:40 +00:00
|
|
|
Q(on)
|
|
|
|
Q(off)
|
|
|
|
Q(toggle)
|
|
|
|
Q(intensity)
|
|
|
|
|
2014-04-21 17:23:50 +00:00
|
|
|
// for Switch class
|
|
|
|
Q(Switch)
|
|
|
|
Q(callback)
|
|
|
|
|
2014-04-21 11:03:09 +00:00
|
|
|
// for UART class
|
|
|
|
Q(UART)
|
2014-04-21 00:14:14 +00:00
|
|
|
Q(baudrate)
|
|
|
|
Q(bits)
|
|
|
|
Q(stop)
|
|
|
|
Q(parity)
|
2014-10-31 00:40:57 +00:00
|
|
|
Q(flow)
|
2014-10-11 16:57:10 +00:00
|
|
|
Q(read_buf_len)
|
|
|
|
Q(buf)
|
|
|
|
Q(len)
|
|
|
|
Q(timeout)
|
|
|
|
Q(timeout_char)
|
2014-04-21 00:14:14 +00:00
|
|
|
Q(init)
|
|
|
|
Q(deinit)
|
2014-10-11 16:57:10 +00:00
|
|
|
Q(any)
|
|
|
|
Q(writechar)
|
|
|
|
Q(readchar)
|
|
|
|
Q(readinto)
|
2015-02-13 19:04:24 +00:00
|
|
|
Q(sendbreak)
|
2014-10-31 00:40:57 +00:00
|
|
|
Q(RTS)
|
|
|
|
Q(CTS)
|
2014-03-26 20:15:40 +00:00
|
|
|
|
2014-10-02 13:34:15 +00:00
|
|
|
// for CAN class
|
2014-11-21 22:24:23 +00:00
|
|
|
#if MICROPY_HW_ENABLE_CAN
|
2014-10-02 13:34:15 +00:00
|
|
|
Q(CAN)
|
|
|
|
Q(prescaler)
|
|
|
|
Q(init)
|
|
|
|
Q(deinit)
|
|
|
|
Q(all)
|
|
|
|
Q(send)
|
|
|
|
Q(recv)
|
|
|
|
Q(addr)
|
|
|
|
Q(fifo)
|
|
|
|
Q(timeout)
|
2014-10-26 20:51:30 +00:00
|
|
|
Q(extframe)
|
2014-11-15 21:28:14 +00:00
|
|
|
Q(sjw)
|
|
|
|
Q(bs1)
|
|
|
|
Q(bs2)
|
2014-11-21 22:24:23 +00:00
|
|
|
Q(bank)
|
|
|
|
Q(params)
|
|
|
|
Q(initfilterbanks)
|
|
|
|
Q(clearfilter)
|
|
|
|
Q(setfilter)
|
2015-01-15 22:16:57 +00:00
|
|
|
Q(rxcallback)
|
2015-04-17 19:15:26 +00:00
|
|
|
Q(rtr)
|
2014-10-02 13:34:15 +00:00
|
|
|
Q(NORMAL)
|
|
|
|
Q(LOOPBACK)
|
|
|
|
Q(SILENT)
|
|
|
|
Q(SILENT_LOOPBACK)
|
2014-11-21 22:24:23 +00:00
|
|
|
Q(MASK16)
|
|
|
|
Q(LIST16)
|
|
|
|
Q(MASK32)
|
|
|
|
Q(LIST32)
|
|
|
|
#endif
|
2014-10-02 13:34:15 +00:00
|
|
|
|
2014-04-21 15:48:16 +00:00
|
|
|
// for Timer class
|
|
|
|
Q(Timer)
|
2014-08-20 20:21:11 +00:00
|
|
|
Q(init)
|
|
|
|
Q(deinit)
|
|
|
|
Q(channel)
|
2014-04-21 15:48:16 +00:00
|
|
|
Q(counter)
|
2014-10-04 13:36:39 +00:00
|
|
|
Q(source_freq)
|
2014-04-21 15:48:16 +00:00
|
|
|
Q(prescaler)
|
|
|
|
Q(period)
|
|
|
|
Q(callback)
|
|
|
|
Q(freq)
|
|
|
|
Q(mode)
|
|
|
|
Q(div)
|
2014-08-20 20:21:11 +00:00
|
|
|
Q(UP)
|
|
|
|
Q(DOWN)
|
|
|
|
Q(CENTER)
|
|
|
|
Q(IC)
|
|
|
|
Q(PWM)
|
|
|
|
Q(PWM_INVERTED)
|
|
|
|
Q(OC_TIMING)
|
|
|
|
Q(OC_ACTIVE)
|
|
|
|
Q(OC_INACTIVE)
|
|
|
|
Q(OC_TOGGLE)
|
|
|
|
Q(OC_FORCED_ACTIVE)
|
|
|
|
Q(OC_FORCED_INACTIVE)
|
2015-03-09 08:04:12 +00:00
|
|
|
Q(ENC_A)
|
|
|
|
Q(ENC_B)
|
|
|
|
Q(ENC_AB)
|
2014-08-20 20:21:11 +00:00
|
|
|
Q(HIGH)
|
|
|
|
Q(LOW)
|
|
|
|
Q(RISING)
|
|
|
|
Q(FALLING)
|
|
|
|
Q(BOTH)
|
|
|
|
|
|
|
|
// for TimerChannel class
|
|
|
|
Q(TimerChannel)
|
|
|
|
Q(pulse_width)
|
2014-09-22 05:40:42 +00:00
|
|
|
Q(pulse_width_percent)
|
2014-08-20 20:21:11 +00:00
|
|
|
Q(compare)
|
|
|
|
Q(capture)
|
|
|
|
Q(polarity)
|
2014-10-10 16:56:41 +00:00
|
|
|
Q(deadtime)
|
2014-04-21 15:48:16 +00:00
|
|
|
|
2014-04-18 21:38:09 +00:00
|
|
|
// for ExtInt class
|
|
|
|
Q(ExtInt)
|
2014-04-19 23:38:50 +00:00
|
|
|
Q(pin)
|
|
|
|
Q(mode)
|
2014-04-20 00:25:58 +00:00
|
|
|
Q(pull)
|
2014-04-19 23:38:50 +00:00
|
|
|
Q(callback)
|
2014-03-26 20:15:40 +00:00
|
|
|
Q(line)
|
|
|
|
Q(enable)
|
|
|
|
Q(disable)
|
|
|
|
Q(swint)
|
2014-03-26 22:35:55 +00:00
|
|
|
Q(regs)
|
2014-04-18 21:38:09 +00:00
|
|
|
Q(IRQ_RISING)
|
|
|
|
Q(IRQ_FALLING)
|
|
|
|
Q(IRQ_RISING_FALLING)
|
|
|
|
Q(EVT_RISING)
|
|
|
|
Q(EVT_FALLING)
|
|
|
|
Q(EVT_RISING_FALLING)
|
2014-03-26 20:15:40 +00:00
|
|
|
|
|
|
|
// for I2C object
|
|
|
|
Q(I2C)
|
2014-04-20 23:10:04 +00:00
|
|
|
Q(mode)
|
|
|
|
Q(addr)
|
|
|
|
Q(baudrate)
|
|
|
|
Q(gencall)
|
|
|
|
Q(data)
|
|
|
|
Q(memaddr)
|
2014-07-22 02:45:04 +00:00
|
|
|
Q(addr_size)
|
2014-04-20 23:10:04 +00:00
|
|
|
Q(timeout)
|
|
|
|
Q(init)
|
|
|
|
Q(deinit)
|
2014-03-26 20:15:40 +00:00
|
|
|
Q(is_ready)
|
2014-04-15 18:24:13 +00:00
|
|
|
Q(scan)
|
2014-04-20 23:10:04 +00:00
|
|
|
Q(send)
|
|
|
|
Q(recv)
|
2014-03-26 20:15:40 +00:00
|
|
|
Q(mem_read)
|
|
|
|
Q(mem_write)
|
|
|
|
|
2014-04-19 23:16:30 +00:00
|
|
|
// for SPI class
|
|
|
|
Q(SPI)
|
|
|
|
Q(init)
|
|
|
|
Q(deinit)
|
|
|
|
Q(send)
|
|
|
|
Q(recv)
|
|
|
|
Q(send_recv)
|
|
|
|
Q(mode)
|
|
|
|
Q(baudrate)
|
2014-04-20 23:10:04 +00:00
|
|
|
Q(polarity)
|
|
|
|
Q(phase)
|
2014-04-19 23:16:30 +00:00
|
|
|
Q(dir)
|
2014-04-21 00:14:14 +00:00
|
|
|
Q(bits)
|
2014-04-19 23:16:30 +00:00
|
|
|
Q(nss)
|
|
|
|
Q(firstbit)
|
|
|
|
Q(ti)
|
2014-04-20 23:10:04 +00:00
|
|
|
Q(crc)
|
2014-04-19 23:16:30 +00:00
|
|
|
Q(MASTER)
|
|
|
|
Q(SLAVE)
|
2014-04-20 23:10:04 +00:00
|
|
|
Q(MSB)
|
|
|
|
Q(LSB)
|
2014-04-19 23:16:30 +00:00
|
|
|
|
2014-03-26 20:15:40 +00:00
|
|
|
// for Accel object
|
|
|
|
Q(Accel)
|
|
|
|
Q(x)
|
|
|
|
Q(y)
|
|
|
|
Q(z)
|
|
|
|
Q(tilt)
|
|
|
|
Q(filtered_xyz)
|
|
|
|
|
|
|
|
// for ADC object
|
|
|
|
Q(ADC)
|
2014-04-18 21:38:09 +00:00
|
|
|
Q(ADCAll)
|
2014-04-15 18:52:56 +00:00
|
|
|
Q(read_timed)
|
2014-03-26 20:15:40 +00:00
|
|
|
Q(read_channel)
|
|
|
|
Q(read_core_temp)
|
|
|
|
Q(read_core_vbat)
|
|
|
|
Q(read_core_vref)
|
|
|
|
|
2014-04-21 12:06:19 +00:00
|
|
|
// for DAC class
|
2014-03-26 20:15:40 +00:00
|
|
|
Q(DAC)
|
|
|
|
Q(noise)
|
|
|
|
Q(triangle)
|
2014-04-21 12:06:19 +00:00
|
|
|
Q(write)
|
|
|
|
Q(write_timed)
|
|
|
|
Q(data)
|
|
|
|
Q(freq)
|
|
|
|
Q(mode)
|
|
|
|
Q(NORMAL)
|
|
|
|
Q(CIRCULAR)
|
2014-03-26 20:15:40 +00:00
|
|
|
|
|
|
|
// for Servo object
|
|
|
|
Q(Servo)
|
2014-04-08 23:45:45 +00:00
|
|
|
Q(pulse_width)
|
2014-04-21 17:21:07 +00:00
|
|
|
Q(calibration)
|
2014-03-26 20:15:40 +00:00
|
|
|
Q(angle)
|
2014-04-08 23:45:45 +00:00
|
|
|
Q(speed)
|
2014-03-26 20:15:40 +00:00
|
|
|
|
2014-03-22 14:56:32 +00:00
|
|
|
// for os module
|
2014-10-12 19:23:47 +00:00
|
|
|
Q(uos)
|
2014-03-22 14:56:32 +00:00
|
|
|
Q(os)
|
|
|
|
Q(/)
|
2014-07-31 22:44:04 +00:00
|
|
|
Q(flash)
|
|
|
|
Q(sd)
|
2015-04-21 14:51:49 +00:00
|
|
|
Q(sysname)
|
|
|
|
Q(nodename)
|
|
|
|
Q(release)
|
|
|
|
Q(version)
|
|
|
|
Q(machine)
|
|
|
|
Q(uname)
|
2014-07-31 22:44:04 +00:00
|
|
|
Q(chdir)
|
|
|
|
Q(getcwd)
|
2014-03-22 14:56:32 +00:00
|
|
|
Q(listdir)
|
|
|
|
Q(mkdir)
|
2015-05-11 00:30:56 +00:00
|
|
|
Q(rename)
|
2014-03-22 14:56:32 +00:00
|
|
|
Q(remove)
|
|
|
|
Q(rmdir)
|
|
|
|
Q(unlink)
|
|
|
|
Q(sep)
|
2014-07-19 15:39:13 +00:00
|
|
|
Q(stat)
|
2014-03-22 14:56:32 +00:00
|
|
|
Q(urandom)
|
2015-10-19 20:57:41 +00:00
|
|
|
Q(dupterm)
|
2014-03-22 15:06:29 +00:00
|
|
|
|
|
|
|
// for time module
|
2014-10-12 19:23:47 +00:00
|
|
|
Q(utime)
|
2014-03-22 15:06:29 +00:00
|
|
|
Q(time)
|
2014-05-08 21:25:49 +00:00
|
|
|
Q(localtime)
|
2014-08-20 01:38:38 +00:00
|
|
|
Q(mktime)
|
2014-03-22 15:06:29 +00:00
|
|
|
Q(sleep)
|
2015-10-19 20:29:29 +00:00
|
|
|
Q(sleep_ms)
|
|
|
|
Q(sleep_us)
|
|
|
|
Q(ticks_ms)
|
|
|
|
Q(ticks_us)
|
|
|
|
Q(ticks_cpu)
|
|
|
|
Q(ticks_diff)
|
2014-03-22 23:53:50 +00:00
|
|
|
|
2014-08-26 16:18:12 +00:00
|
|
|
// for select module
|
2014-10-12 19:23:47 +00:00
|
|
|
Q(uselect)
|
2014-08-26 16:18:12 +00:00
|
|
|
Q(select)
|
|
|
|
Q(poll)
|
|
|
|
Q(register)
|
|
|
|
Q(unregister)
|
|
|
|
Q(modify)
|
2015-11-09 20:10:01 +00:00
|
|
|
Q(POLLIN)
|
|
|
|
Q(POLLOUT)
|
|
|
|
Q(POLLERR)
|
|
|
|
Q(POLLHUP)
|
2014-08-26 16:18:12 +00:00
|
|
|
|
2014-03-22 23:53:50 +00:00
|
|
|
// for input
|
|
|
|
Q(input)
|
stmhal: Add stm module, which contains some constants for the MCU.
Also contains raw memory read/write functions, read8, read16, read32,
write8, write16, write32. Can now do:
stm.write16(stm.GPIOA + stm.GPIO_BSRRL, 1 << 13)
This turns on the red LED.
With the new constant folding, the above constants for the GPIO address
are actually compiled to constants (and the addition done) at compile
time. For viper code and inline assembler, this optimisation will make
a big difference. In the inline assembler, using these constants would
not be possible without this constant folding.
2014-04-10 21:46:40 +00:00
|
|
|
|
2014-06-14 23:41:47 +00:00
|
|
|
// for LCD class
|
|
|
|
Q(LCD)
|
|
|
|
Q(command)
|
|
|
|
Q(contrast)
|
|
|
|
Q(light)
|
|
|
|
Q(fill)
|
|
|
|
Q(get)
|
|
|
|
Q(pixel)
|
|
|
|
Q(text)
|
|
|
|
Q(show)
|
|
|
|
|
2014-09-30 21:29:49 +00:00
|
|
|
// for usocket module
|
|
|
|
Q(usocket)
|
|
|
|
Q(socket)
|
|
|
|
Q(getaddrinfo)
|
2014-11-29 13:48:45 +00:00
|
|
|
Q(bind)
|
|
|
|
Q(listen)
|
|
|
|
Q(accept)
|
|
|
|
Q(connect)
|
|
|
|
Q(send)
|
|
|
|
Q(recv)
|
|
|
|
Q(sendto)
|
|
|
|
Q(recvfrom)
|
|
|
|
Q(setblocking)
|
|
|
|
Q(setsockopt)
|
|
|
|
Q(settimeout)
|
|
|
|
Q(close)
|
2014-09-30 21:29:49 +00:00
|
|
|
Q(AF_INET)
|
|
|
|
Q(AF_INET6)
|
|
|
|
Q(SOCK_STREAM)
|
|
|
|
Q(SOCK_DGRAM)
|
|
|
|
Q(SOCK_RAW)
|
|
|
|
|
|
|
|
// for network module
|
|
|
|
Q(network)
|
|
|
|
Q(route)
|
|
|
|
|
2014-11-29 13:48:45 +00:00
|
|
|
// for WIZNET5K class
|
2014-09-25 23:57:26 +00:00
|
|
|
#if MICROPY_PY_WIZNET5K
|
2014-11-29 13:48:45 +00:00
|
|
|
Q(WIZNET5K)
|
2014-09-01 21:48:57 +00:00
|
|
|
Q(regs)
|
2015-07-10 16:04:42 +00:00
|
|
|
Q(ifconfig)
|
2014-09-01 21:48:57 +00:00
|
|
|
Q(ipaddr)
|
|
|
|
#endif
|
|
|
|
|
2014-11-29 13:48:45 +00:00
|
|
|
// for CC3K class
|
2014-09-25 23:57:26 +00:00
|
|
|
#if MICROPY_PY_CC3K
|
2014-11-29 13:48:45 +00:00
|
|
|
Q(CC3K)
|
2014-09-25 23:57:26 +00:00
|
|
|
Q(connect)
|
|
|
|
Q(disconnect)
|
2014-11-29 13:48:45 +00:00
|
|
|
Q(isconnected)
|
2014-09-25 23:57:26 +00:00
|
|
|
Q(ifconfig)
|
|
|
|
Q(patch_version)
|
|
|
|
Q(patch_program)
|
|
|
|
Q(WEP)
|
|
|
|
Q(WPA)
|
|
|
|
Q(WPA2)
|
2014-09-30 21:29:49 +00:00
|
|
|
Q(ssid)
|
|
|
|
Q(key)
|
|
|
|
Q(security)
|
|
|
|
Q(bssid)
|
2014-09-25 23:57:26 +00:00
|
|
|
#endif
|
|
|
|
|
stmhal: Add stm module, which contains some constants for the MCU.
Also contains raw memory read/write functions, read8, read16, read32,
write8, write16, write32. Can now do:
stm.write16(stm.GPIOA + stm.GPIO_BSRRL, 1 << 13)
This turns on the red LED.
With the new constant folding, the above constants for the GPIO address
are actually compiled to constants (and the addition done) at compile
time. For viper code and inline assembler, this optimisation will make
a big difference. In the inline assembler, using these constants would
not be possible without this constant folding.
2014-04-10 21:46:40 +00:00
|
|
|
// for stm module
|
|
|
|
Q(stm)
|
2014-04-18 21:38:09 +00:00
|
|
|
Q(mem)
|
|
|
|
Q(mem8)
|
|
|
|
Q(mem16)
|
|
|
|
Q(mem32)
|