2015-04-10 15:02:07 -04:00
|
|
|
/*
|
|
|
|
* This file is part of the Micro Python project, http://micropython.org/
|
|
|
|
*
|
|
|
|
* The MIT License (MIT)
|
|
|
|
*
|
|
|
|
* Copyright (c) 2013, 2014 Damien P. George
|
|
|
|
* Copyright (c) 2015 Daniel Campora
|
|
|
|
*
|
|
|
|
* 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.
|
|
|
|
*/
|
|
|
|
|
2015-02-06 09:35:48 -05:00
|
|
|
// qstrs specific to this port
|
|
|
|
Q(__name__)
|
|
|
|
Q(help)
|
|
|
|
Q(pyb)
|
|
|
|
Q(info)
|
2015-06-10 13:30:56 -04:00
|
|
|
Q(reset)
|
2015-02-06 09:35:48 -05:00
|
|
|
Q(main)
|
|
|
|
Q(sync)
|
|
|
|
Q(gc)
|
|
|
|
Q(rng)
|
|
|
|
Q(delay)
|
|
|
|
Q(time)
|
|
|
|
Q(open)
|
|
|
|
Q(on)
|
|
|
|
Q(off)
|
|
|
|
Q(toggle)
|
|
|
|
Q(write)
|
|
|
|
Q(read)
|
|
|
|
Q(readall)
|
|
|
|
Q(readline)
|
|
|
|
Q(input)
|
|
|
|
Q(os)
|
|
|
|
Q(freq)
|
2015-05-29 04:22:20 -04:00
|
|
|
Q(unique_id)
|
2015-02-06 09:35:48 -05:00
|
|
|
Q(repl_info)
|
|
|
|
Q(disable_irq)
|
|
|
|
Q(enable_irq)
|
|
|
|
Q(millis)
|
|
|
|
Q(micros)
|
|
|
|
Q(elapsed_millis)
|
|
|
|
Q(elapsed_micros)
|
|
|
|
Q(udelay)
|
|
|
|
Q(flush)
|
2015-02-25 05:08:51 -05:00
|
|
|
Q(FileIO)
|
2015-02-26 09:29:47 -05:00
|
|
|
Q(enable)
|
|
|
|
Q(disable)
|
2015-02-06 09:35:48 -05:00
|
|
|
// Entries for sys.path
|
2015-04-10 15:02:07 -04:00
|
|
|
Q(/flash)
|
|
|
|
Q(/flash/lib)
|
|
|
|
#if MICROPY_HW_HAS_SDCARD
|
|
|
|
Q(/sd)
|
|
|
|
Q(/sd/lib)
|
|
|
|
#endif
|
2015-02-06 09:35:48 -05:00
|
|
|
|
|
|
|
// for module weak links
|
2015-07-10 03:19:59 -04:00
|
|
|
Q(struct)
|
2015-05-07 06:16:55 -04:00
|
|
|
Q(binascii)
|
2015-02-06 09:35:48 -05:00
|
|
|
Q(re)
|
|
|
|
Q(json)
|
|
|
|
Q(heapq)
|
2015-05-21 12:51:57 -04:00
|
|
|
Q(hashlib)
|
2015-02-06 09:35:48 -05:00
|
|
|
|
|
|
|
// for os module
|
|
|
|
Q(uos)
|
|
|
|
Q(os)
|
2015-04-28 13:53:45 -04:00
|
|
|
Q(sysname)
|
|
|
|
Q(nodename)
|
|
|
|
Q(release)
|
|
|
|
Q(version)
|
|
|
|
Q(machine)
|
|
|
|
Q(uname)
|
2015-02-06 09:35:48 -05:00
|
|
|
Q(/)
|
2015-04-10 15:02:07 -04:00
|
|
|
Q(flash)
|
|
|
|
#if MICROPY_HW_HAS_SDCARD
|
|
|
|
Q(sd)
|
|
|
|
#endif
|
2015-02-06 09:35:48 -05:00
|
|
|
Q(chdir)
|
|
|
|
Q(getcwd)
|
|
|
|
Q(listdir)
|
|
|
|
Q(mkdir)
|
2015-05-13 09:06:11 -04:00
|
|
|
Q(rename)
|
2015-02-06 09:35:48 -05:00
|
|
|
Q(remove)
|
|
|
|
Q(rmdir)
|
|
|
|
Q(unlink)
|
|
|
|
Q(sep)
|
|
|
|
Q(stat)
|
|
|
|
Q(urandom)
|
2015-06-10 16:24:47 -04:00
|
|
|
Q(mkfs)
|
2015-02-06 09:35:48 -05:00
|
|
|
|
|
|
|
// for file class
|
|
|
|
Q(seek)
|
|
|
|
Q(tell)
|
|
|
|
|
2015-02-09 13:38:02 -05:00
|
|
|
// for Pin class
|
|
|
|
Q(Pin)
|
2015-06-28 06:53:37 -04:00
|
|
|
Q(cpu)
|
2015-02-06 09:35:48 -05:00
|
|
|
Q(init)
|
|
|
|
Q(value)
|
|
|
|
Q(low)
|
|
|
|
Q(high)
|
2015-05-02 16:57:51 -04:00
|
|
|
Q(toggle)
|
2015-05-28 06:36:48 -04:00
|
|
|
Q(info)
|
2015-02-06 09:35:48 -05:00
|
|
|
Q(name)
|
2015-05-02 16:57:51 -04:00
|
|
|
Q(af)
|
2015-02-06 09:35:48 -05:00
|
|
|
Q(mode)
|
2015-05-02 16:57:51 -04:00
|
|
|
Q(type)
|
2015-02-06 09:35:48 -05:00
|
|
|
Q(strength)
|
|
|
|
Q(IN)
|
|
|
|
Q(OUT)
|
|
|
|
Q(STD)
|
|
|
|
Q(STD_PU)
|
|
|
|
Q(STD_PD)
|
|
|
|
Q(OD)
|
|
|
|
Q(OD_PU)
|
|
|
|
Q(OD_PD)
|
2015-03-04 07:51:01 -05:00
|
|
|
Q(INT_RISING)
|
|
|
|
Q(INT_FALLING)
|
|
|
|
Q(INT_RISING_FALLING)
|
|
|
|
Q(INT_LOW_LEVEL)
|
|
|
|
Q(INT_HIGH_LEVEL)
|
2015-02-06 09:35:48 -05:00
|
|
|
Q(S2MA)
|
|
|
|
Q(S4MA)
|
|
|
|
Q(S6MA)
|
|
|
|
|
|
|
|
// for UART class
|
|
|
|
Q(UART)
|
|
|
|
Q(baudrate)
|
|
|
|
Q(bits)
|
|
|
|
Q(stop)
|
|
|
|
Q(parity)
|
|
|
|
Q(init)
|
|
|
|
Q(deinit)
|
|
|
|
Q(all)
|
|
|
|
Q(writechar)
|
|
|
|
Q(readchar)
|
2015-06-09 11:14:31 -04:00
|
|
|
Q(sendbreak)
|
2015-02-06 09:35:48 -05:00
|
|
|
Q(readinto)
|
|
|
|
Q(read_buf_len)
|
|
|
|
Q(timeout)
|
|
|
|
Q(timeout_char)
|
|
|
|
Q(repl_uart)
|
|
|
|
Q(flow)
|
2015-06-09 10:15:23 -04:00
|
|
|
Q(RTS)
|
|
|
|
Q(CTS)
|
2015-02-06 09:35:48 -05:00
|
|
|
|
2015-02-10 07:11:27 -05:00
|
|
|
// for I2C class
|
|
|
|
Q(I2C)
|
2015-05-25 15:06:45 -04:00
|
|
|
Q(mode)
|
|
|
|
Q(baudrate)
|
2015-02-10 07:11:27 -05:00
|
|
|
Q(addr)
|
|
|
|
Q(data)
|
2015-08-02 14:20:03 -04:00
|
|
|
Q(timeout)
|
2015-02-10 07:11:27 -05:00
|
|
|
Q(memaddr)
|
|
|
|
Q(addr_size)
|
|
|
|
Q(init)
|
|
|
|
Q(deinit)
|
|
|
|
Q(is_ready)
|
|
|
|
Q(scan)
|
|
|
|
Q(send)
|
|
|
|
Q(recv)
|
|
|
|
Q(mem_read)
|
|
|
|
Q(mem_write)
|
2015-05-25 15:06:45 -04:00
|
|
|
Q(MASTER)
|
2015-02-10 07:11:27 -05:00
|
|
|
|
2015-02-19 15:03:21 -05:00
|
|
|
// for ADC class
|
|
|
|
Q(ADC)
|
|
|
|
Q(read)
|
2015-08-10 10:44:20 -04:00
|
|
|
Q(init)
|
|
|
|
Q(deinit)
|
2015-02-19 15:03:21 -05:00
|
|
|
|
2015-04-10 15:02:07 -04:00
|
|
|
#if MICROPY_HW_HAS_SDCARD
|
2015-02-21 08:10:33 -05:00
|
|
|
// for SD class
|
|
|
|
Q(SD)
|
2015-08-11 10:06:43 -04:00
|
|
|
Q(init)
|
|
|
|
Q(deinit)
|
|
|
|
Q(mount)
|
|
|
|
Q(unmount)
|
2015-04-10 15:02:07 -04:00
|
|
|
#endif
|
2015-02-21 08:10:33 -05:00
|
|
|
|
2015-02-06 09:35:48 -05:00
|
|
|
// for RTC class
|
|
|
|
Q(RTC)
|
|
|
|
Q(datetime)
|
|
|
|
|
|
|
|
// for time class
|
|
|
|
Q(utime)
|
|
|
|
Q(localtime)
|
|
|
|
Q(mktime)
|
|
|
|
Q(sleep)
|
|
|
|
Q(time)
|
|
|
|
|
|
|
|
// for select class
|
|
|
|
Q(select)
|
|
|
|
Q(uselect)
|
|
|
|
Q(register)
|
|
|
|
Q(unregister)
|
|
|
|
Q(modify)
|
|
|
|
Q(poll)
|
|
|
|
|
|
|
|
// for socket class
|
|
|
|
Q(socket)
|
|
|
|
Q(usocket)
|
|
|
|
Q(getaddrinfo)
|
|
|
|
Q(family)
|
|
|
|
Q(type)
|
|
|
|
Q(send)
|
2015-07-17 05:38:01 -04:00
|
|
|
Q(sendall)
|
2015-02-06 09:35:48 -05:00
|
|
|
Q(sendto)
|
|
|
|
Q(recv)
|
|
|
|
Q(recvfrom)
|
|
|
|
Q(listen)
|
|
|
|
Q(accept)
|
|
|
|
Q(bind)
|
|
|
|
Q(settimeout)
|
|
|
|
Q(setblocking)
|
|
|
|
Q(setsockopt)
|
|
|
|
Q(close)
|
2015-07-28 17:06:17 -04:00
|
|
|
Q(makefile)
|
2015-02-06 09:35:48 -05:00
|
|
|
Q(protocol)
|
2015-06-29 16:49:18 -04:00
|
|
|
Q(error)
|
|
|
|
Q(timeout)
|
2015-02-06 09:35:48 -05:00
|
|
|
Q(AF_INET)
|
|
|
|
Q(AF_INET6)
|
|
|
|
Q(SOCK_STREAM)
|
|
|
|
Q(SOCK_DGRAM)
|
|
|
|
Q(SOCK_RAW)
|
2015-04-13 10:42:02 -04:00
|
|
|
Q(IPPROTO_SEC)
|
2015-02-06 09:35:48 -05:00
|
|
|
Q(IPPROTO_TCP)
|
|
|
|
Q(IPPROTO_UDP)
|
|
|
|
Q(IPPROTO_RAW)
|
|
|
|
|
2015-06-11 14:26:24 -04:00
|
|
|
// for ssl class
|
|
|
|
Q(ssl)
|
|
|
|
Q(ussl)
|
|
|
|
Q(wrap_socket)
|
|
|
|
Q(sock)
|
|
|
|
Q(keyfile)
|
|
|
|
Q(certfile)
|
|
|
|
Q(server_side)
|
|
|
|
Q(cert_reqs)
|
|
|
|
Q(ca_certs)
|
|
|
|
Q(SSLError)
|
|
|
|
Q(CERT_NONE)
|
|
|
|
Q(CERT_OPTIONAL)
|
|
|
|
Q(CERT_REQUIRED)
|
|
|
|
|
2015-02-06 09:35:48 -05:00
|
|
|
// for network class
|
|
|
|
Q(network)
|
2015-05-09 11:46:16 -04:00
|
|
|
Q(server_running)
|
2015-03-19 12:06:20 -04:00
|
|
|
Q(server_login)
|
2015-06-03 11:28:03 -04:00
|
|
|
Q(server_timeout)
|
2015-02-06 09:35:48 -05:00
|
|
|
|
2015-02-22 12:43:01 -05:00
|
|
|
// for WLAN class
|
2015-02-06 09:35:48 -05:00
|
|
|
Q(WLAN)
|
2015-08-05 07:36:29 -04:00
|
|
|
Q(iwconfig)
|
2015-02-06 09:35:48 -05:00
|
|
|
Q(key)
|
|
|
|
Q(security)
|
|
|
|
Q(ssid)
|
|
|
|
Q(bssid)
|
|
|
|
Q(scan)
|
|
|
|
Q(connect)
|
2015-02-23 05:22:15 -05:00
|
|
|
Q(isconnected)
|
2015-02-06 09:35:48 -05:00
|
|
|
Q(disconnect)
|
|
|
|
Q(channel)
|
2015-04-28 17:52:26 -04:00
|
|
|
Q(rssi)
|
2015-02-23 05:22:15 -05:00
|
|
|
Q(ifconfig)
|
2015-05-18 18:36:06 -04:00
|
|
|
Q(info)
|
|
|
|
Q(connections)
|
2015-08-05 07:36:29 -04:00
|
|
|
#if MICROPY_PORT_WLAN_URN
|
2015-02-22 12:43:01 -05:00
|
|
|
Q(urn)
|
2015-08-05 07:36:29 -04:00
|
|
|
#endif
|
2015-04-12 17:55:34 -04:00
|
|
|
Q(mode)
|
|
|
|
Q(ip)
|
|
|
|
Q(subnet)
|
|
|
|
Q(gateway)
|
|
|
|
Q(dns)
|
2015-05-02 16:19:31 -04:00
|
|
|
Q(mac)
|
2015-06-06 12:42:51 -04:00
|
|
|
Q(antenna)
|
2015-02-06 09:35:48 -05:00
|
|
|
Q(STA)
|
|
|
|
Q(AP)
|
|
|
|
Q(OPEN)
|
|
|
|
Q(WEP)
|
2015-08-05 07:36:29 -04:00
|
|
|
Q(WPA)
|
|
|
|
Q(WPA2)
|
|
|
|
Q(INTERNAL)
|
|
|
|
Q(EXTERNAL)
|
2015-02-26 09:29:47 -05:00
|
|
|
|
|
|
|
// for WDT class
|
|
|
|
Q(WDT)
|
|
|
|
Q(kick)
|
|
|
|
|
|
|
|
// for HeartBeat class
|
|
|
|
Q(HeartBeat)
|
2015-03-19 10:17:39 -04:00
|
|
|
Q(enable)
|
|
|
|
Q(disable)
|
2015-02-26 09:29:47 -05:00
|
|
|
|
2015-03-04 07:52:39 -05:00
|
|
|
// for callback class
|
|
|
|
Q(init)
|
|
|
|
Q(enable)
|
|
|
|
Q(disable)
|
|
|
|
Q(callback)
|
|
|
|
Q(handler)
|
2015-05-17 08:49:17 -04:00
|
|
|
Q(mode)
|
2015-03-04 07:52:39 -05:00
|
|
|
Q(value)
|
|
|
|
Q(priority)
|
2015-08-11 05:18:02 -04:00
|
|
|
Q(wake_from)
|
2015-03-04 07:52:39 -05:00
|
|
|
|
|
|
|
// for Sleep class
|
|
|
|
Q(Sleep)
|
|
|
|
Q(idle)
|
|
|
|
Q(suspend)
|
|
|
|
Q(hibernate)
|
2015-03-14 04:59:47 -04:00
|
|
|
Q(reset_cause)
|
|
|
|
Q(wake_reason)
|
2015-03-12 11:14:55 -04:00
|
|
|
Q(ACTIVE)
|
2015-03-04 07:52:39 -05:00
|
|
|
Q(SUSPENDED)
|
|
|
|
Q(HIBERNATING)
|
2015-05-01 17:09:29 -04:00
|
|
|
Q(POWER_ON)
|
2015-03-14 04:59:47 -04:00
|
|
|
Q(HARD_RESET)
|
|
|
|
Q(WDT_RESET)
|
|
|
|
Q(HIB_RESET)
|
|
|
|
Q(SOFT_RESET)
|
|
|
|
Q(WLAN_WAKE)
|
|
|
|
Q(PIN_WAKE)
|
|
|
|
Q(RTC_WAKE)
|
|
|
|
|
2015-03-19 10:17:39 -04:00
|
|
|
// for SPI class
|
|
|
|
Q(SPI)
|
2015-05-25 15:06:45 -04:00
|
|
|
Q(mode)
|
2015-03-19 10:17:39 -04:00
|
|
|
Q(baudrate)
|
|
|
|
Q(bits)
|
2015-05-26 04:32:29 -04:00
|
|
|
Q(polarity)
|
|
|
|
Q(phase)
|
2015-08-11 08:21:50 -04:00
|
|
|
Q(cs_polarity)
|
2015-03-19 10:17:39 -04:00
|
|
|
Q(init)
|
|
|
|
Q(deinit)
|
|
|
|
Q(send)
|
|
|
|
Q(recv)
|
|
|
|
Q(send_recv)
|
2015-08-02 14:20:03 -04:00
|
|
|
Q(timeout)
|
2015-05-25 15:06:45 -04:00
|
|
|
Q(MASTER)
|
2015-03-19 10:17:39 -04:00
|
|
|
Q(ACTIVE_LOW)
|
|
|
|
Q(ACTIVE_HIGH)
|
|
|
|
|
2015-05-09 11:46:16 -04:00
|
|
|
// for Timer class
|
|
|
|
Q(Timer)
|
|
|
|
Q(TimerChannel)
|
|
|
|
Q(init)
|
|
|
|
Q(deinit)
|
|
|
|
Q(freq)
|
2015-05-29 09:47:07 -04:00
|
|
|
Q(period)
|
2015-05-09 11:46:16 -04:00
|
|
|
Q(mode)
|
|
|
|
Q(width)
|
|
|
|
Q(channel)
|
|
|
|
Q(polarity)
|
|
|
|
Q(duty_cycle)
|
|
|
|
Q(time)
|
|
|
|
Q(event_count)
|
|
|
|
Q(event_time)
|
|
|
|
Q(A)
|
|
|
|
Q(B)
|
|
|
|
Q(ONE_SHOT)
|
|
|
|
Q(PERIODIC)
|
|
|
|
Q(EDGE_COUNT)
|
|
|
|
Q(EDGE_TIME)
|
|
|
|
Q(PWM)
|
|
|
|
Q(POSITIVE)
|
|
|
|
Q(NEGATIVE)
|
|
|
|
|
2015-05-19 18:23:13 -04:00
|
|
|
// for uhashlib module
|
|
|
|
Q(uhashlib)
|
|
|
|
Q(update)
|
|
|
|
Q(digest)
|
|
|
|
//Q(md5)
|
|
|
|
Q(sha1)
|
|
|
|
Q(sha256)
|
2015-05-22 03:54:10 -04:00
|
|
|
|
|
|
|
// for ubinascii module
|
|
|
|
Q(ubinascii)
|
|
|
|
Q(hexlify)
|
|
|
|
Q(unhexlify)
|
2015-07-04 10:33:54 -04:00
|
|
|
Q(a2b_base64)
|
|
|
|
Q(b2a_base64)
|
|
|
|
|