2015-04-10 20:02:07 +01: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-09-27 12:45:48 +01:00
|
|
|
// for machine module
|
2015-12-18 00:35:33 +00:00
|
|
|
Q(umachine)
|
2015-09-25 14:20:07 +01:00
|
|
|
#ifdef DEBUG
|
2015-02-06 14:35:48 +00:00
|
|
|
Q(info)
|
2015-09-25 14:20:07 +01:00
|
|
|
#endif
|
2015-06-10 18:30:56 +01:00
|
|
|
Q(reset)
|
2015-02-06 14:35:48 +00:00
|
|
|
Q(main)
|
|
|
|
Q(sync)
|
|
|
|
Q(rng)
|
|
|
|
Q(freq)
|
2015-05-29 09:22:20 +01:00
|
|
|
Q(unique_id)
|
2015-02-06 14:35:48 +00:00
|
|
|
Q(disable_irq)
|
|
|
|
Q(enable_irq)
|
2015-09-27 12:45:48 +01:00
|
|
|
Q(idle)
|
|
|
|
Q(sleep)
|
|
|
|
Q(deepsleep)
|
|
|
|
Q(reset_cause)
|
|
|
|
Q(wake_reason)
|
|
|
|
Q(IDLE)
|
|
|
|
Q(SLEEP)
|
|
|
|
Q(DEEPSLEEP)
|
|
|
|
Q(POWER_ON)
|
|
|
|
Q(HARD_RESET)
|
|
|
|
Q(WDT_RESET)
|
|
|
|
Q(DEEPSLEEP_RESET)
|
|
|
|
Q(SOFT_RESET)
|
|
|
|
Q(WLAN_WAKE)
|
|
|
|
Q(PIN_WAKE)
|
|
|
|
Q(RTC_WAKE)
|
2015-09-25 14:20:07 +01:00
|
|
|
|
2015-10-14 08:46:18 +01:00
|
|
|
// for wipy module
|
|
|
|
Q(wipy)
|
|
|
|
Q(heartbeat)
|
|
|
|
|
2015-09-16 13:09:51 +01:00
|
|
|
// entries for sys.path
|
2015-04-10 20:02:07 +01:00
|
|
|
Q(/flash)
|
|
|
|
Q(/flash/lib)
|
2015-02-06 14:35:48 +00:00
|
|
|
|
2015-09-27 12:45:48 +01:00
|
|
|
// interactive help
|
|
|
|
Q(help)
|
|
|
|
|
2015-02-06 14:35:48 +00:00
|
|
|
// for module weak links
|
2015-07-10 08:19:59 +01:00
|
|
|
Q(struct)
|
2015-05-07 11:16:55 +01:00
|
|
|
Q(binascii)
|
2015-02-06 14:35:48 +00:00
|
|
|
Q(re)
|
|
|
|
Q(json)
|
|
|
|
Q(heapq)
|
2015-09-27 17:04:11 +01:00
|
|
|
//Q(hashlib)
|
2015-02-06 14:35:48 +00:00
|
|
|
|
|
|
|
// for os module
|
|
|
|
Q(os)
|
2015-09-16 13:09:51 +01:00
|
|
|
Q(uos)
|
2015-04-28 18:53:45 +01:00
|
|
|
Q(sysname)
|
|
|
|
Q(nodename)
|
|
|
|
Q(release)
|
|
|
|
Q(version)
|
|
|
|
Q(machine)
|
|
|
|
Q(uname)
|
2015-02-06 14:35:48 +00:00
|
|
|
Q(/)
|
2015-04-10 20:02:07 +01:00
|
|
|
Q(flash)
|
2015-02-06 14:35:48 +00:00
|
|
|
Q(chdir)
|
|
|
|
Q(getcwd)
|
|
|
|
Q(listdir)
|
|
|
|
Q(mkdir)
|
2015-05-13 14:06:11 +01:00
|
|
|
Q(rename)
|
2015-02-06 14:35:48 +00:00
|
|
|
Q(remove)
|
|
|
|
Q(rmdir)
|
|
|
|
Q(unlink)
|
|
|
|
Q(sep)
|
|
|
|
Q(stat)
|
|
|
|
Q(urandom)
|
2015-06-10 21:24:47 +01:00
|
|
|
Q(mkfs)
|
2015-09-16 13:09:51 +01:00
|
|
|
Q(mount)
|
|
|
|
Q(unmount)
|
2015-09-25 14:20:07 +01:00
|
|
|
Q(dupterm)
|
2015-09-16 13:09:51 +01:00
|
|
|
Q(readonly)
|
|
|
|
Q(readblocks)
|
|
|
|
Q(writeblocks)
|
|
|
|
Q(sync)
|
|
|
|
Q(count)
|
2015-02-06 14:35:48 +00:00
|
|
|
|
|
|
|
// for file class
|
|
|
|
Q(seek)
|
|
|
|
Q(tell)
|
2015-09-25 14:20:07 +01:00
|
|
|
Q(input)
|
|
|
|
Q(flush)
|
2015-02-06 14:35:48 +00:00
|
|
|
|
2015-02-09 18:38:02 +00:00
|
|
|
// for Pin class
|
|
|
|
Q(Pin)
|
2015-08-18 13:07:19 +01:00
|
|
|
Q(board)
|
2015-02-06 14:35:48 +00:00
|
|
|
Q(init)
|
|
|
|
Q(value)
|
2015-05-02 21:57:51 +01:00
|
|
|
Q(toggle)
|
2015-08-18 13:07:19 +01:00
|
|
|
Q(id)
|
2015-02-06 14:35:48 +00:00
|
|
|
Q(mode)
|
2015-08-18 13:07:19 +01:00
|
|
|
Q(pull)
|
|
|
|
Q(drive)
|
2015-08-23 12:52:31 +01:00
|
|
|
Q(alt)
|
2015-09-07 08:23:46 +01:00
|
|
|
Q(alt_list)
|
2015-02-06 14:35:48 +00:00
|
|
|
Q(IN)
|
|
|
|
Q(OUT)
|
2015-08-18 13:07:19 +01:00
|
|
|
Q(OPEN_DRAIN)
|
|
|
|
Q(ALT)
|
|
|
|
Q(ALT_OPEN_DRAIN)
|
|
|
|
Q(PULL_UP)
|
|
|
|
Q(PULL_DOWN)
|
|
|
|
Q(LOW_POWER)
|
|
|
|
Q(MED_POWER)
|
|
|
|
Q(HIGH_POWER)
|
2015-09-03 10:25:44 +01:00
|
|
|
Q(IRQ_RISING)
|
|
|
|
Q(IRQ_FALLING)
|
|
|
|
Q(IRQ_LOW_LEVEL)
|
|
|
|
Q(IRQ_HIGH_LEVEL)
|
2015-02-06 14:35:48 +00:00
|
|
|
|
|
|
|
// for UART class
|
|
|
|
Q(UART)
|
2015-09-07 08:23:46 +01:00
|
|
|
Q(init)
|
|
|
|
Q(deinit)
|
|
|
|
Q(any)
|
|
|
|
Q(sendbreak)
|
2015-09-11 08:33:19 +01:00
|
|
|
Q(id)
|
2015-02-06 14:35:48 +00:00
|
|
|
Q(baudrate)
|
|
|
|
Q(bits)
|
|
|
|
Q(stop)
|
|
|
|
Q(parity)
|
2015-09-07 08:23:46 +01:00
|
|
|
Q(pins)
|
2015-09-13 14:59:45 +01:00
|
|
|
Q(EVEN)
|
|
|
|
Q(ODD)
|
2015-09-07 08:23:46 +01:00
|
|
|
Q(RX_ANY)
|
2015-02-06 14:35:48 +00:00
|
|
|
|
2015-02-10 12:11:27 +00:00
|
|
|
// for I2C class
|
|
|
|
Q(I2C)
|
2015-09-11 10:05:58 +01:00
|
|
|
Q(id)
|
2015-05-25 20:06:45 +01:00
|
|
|
Q(mode)
|
|
|
|
Q(baudrate)
|
2015-09-08 14:08:33 +01:00
|
|
|
Q(pins)
|
2015-02-10 12:11:27 +00:00
|
|
|
Q(addr)
|
2015-09-08 14:08:33 +01:00
|
|
|
Q(nbytes)
|
|
|
|
Q(buf)
|
|
|
|
Q(stop)
|
2015-02-10 12:11:27 +00:00
|
|
|
Q(memaddr)
|
2015-09-08 14:08:33 +01:00
|
|
|
Q(addrsize)
|
2015-02-10 12:11:27 +00:00
|
|
|
Q(init)
|
|
|
|
Q(deinit)
|
|
|
|
Q(scan)
|
2015-09-08 14:08:33 +01:00
|
|
|
Q(readfrom)
|
|
|
|
Q(readfrom_into)
|
|
|
|
Q(writeto)
|
|
|
|
Q(readfrom_mem)
|
|
|
|
Q(readfrom_mem_into)
|
|
|
|
Q(writeto_mem)
|
2015-05-25 20:06:45 +01:00
|
|
|
Q(MASTER)
|
2015-02-10 12:11:27 +00:00
|
|
|
|
2015-02-19 20:03:21 +00:00
|
|
|
// for ADC class
|
|
|
|
Q(ADC)
|
2015-09-14 19:03:32 +01:00
|
|
|
Q(ADCChannel)
|
|
|
|
Q(value)
|
2015-08-10 15:44:20 +01:00
|
|
|
Q(init)
|
|
|
|
Q(deinit)
|
2015-09-14 19:03:32 +01:00
|
|
|
Q(channel)
|
|
|
|
Q(id)
|
|
|
|
Q(pin)
|
2015-02-19 20:03:21 +00:00
|
|
|
|
2015-02-21 13:10:33 +00:00
|
|
|
// for SD class
|
|
|
|
Q(SD)
|
2015-08-11 15:06:43 +01:00
|
|
|
Q(init)
|
|
|
|
Q(deinit)
|
2015-09-16 13:09:51 +01:00
|
|
|
Q(id)
|
|
|
|
Q(pins)
|
2015-02-21 13:10:33 +00:00
|
|
|
|
2015-02-06 14:35:48 +00:00
|
|
|
// for RTC class
|
|
|
|
Q(RTC)
|
2015-09-26 21:55:24 +01:00
|
|
|
Q(id)
|
2015-09-16 13:09:51 +01:00
|
|
|
Q(init)
|
|
|
|
Q(alarm)
|
|
|
|
Q(alarm_left)
|
2015-09-22 22:20:29 +01:00
|
|
|
Q(alarm_cancel)
|
2015-09-16 13:09:51 +01:00
|
|
|
Q(now)
|
|
|
|
Q(deinit)
|
2015-02-06 14:35:48 +00:00
|
|
|
Q(datetime)
|
2015-09-16 13:09:51 +01:00
|
|
|
Q(repeat)
|
2015-09-22 22:20:29 +01:00
|
|
|
Q(ALARM0)
|
2015-02-06 14:35:48 +00:00
|
|
|
|
|
|
|
// for time class
|
2015-09-16 13:09:51 +01:00
|
|
|
Q(time)
|
2015-02-06 14:35:48 +00:00
|
|
|
Q(utime)
|
|
|
|
Q(localtime)
|
|
|
|
Q(mktime)
|
|
|
|
Q(sleep)
|
2015-09-16 13:09:51 +01:00
|
|
|
Q(sleep_ms)
|
|
|
|
Q(sleep_us)
|
|
|
|
Q(ticks_ms)
|
|
|
|
Q(ticks_us)
|
|
|
|
Q(ticks_cpu)
|
|
|
|
Q(ticks_diff)
|
2015-02-06 14:35:48 +00:00
|
|
|
|
|
|
|
// for select class
|
|
|
|
Q(select)
|
|
|
|
Q(uselect)
|
|
|
|
Q(register)
|
|
|
|
Q(unregister)
|
|
|
|
Q(modify)
|
|
|
|
Q(poll)
|
2015-11-09 20:10:01 +00:00
|
|
|
Q(POLLIN)
|
|
|
|
Q(POLLOUT)
|
|
|
|
Q(POLLERR)
|
|
|
|
Q(POLLHUP)
|
2015-02-06 14:35:48 +00:00
|
|
|
|
|
|
|
// for socket class
|
|
|
|
Q(socket)
|
|
|
|
Q(usocket)
|
|
|
|
Q(getaddrinfo)
|
|
|
|
Q(family)
|
|
|
|
Q(type)
|
|
|
|
Q(send)
|
2015-07-17 10:38:01 +01:00
|
|
|
Q(sendall)
|
2015-02-06 14:35:48 +00:00
|
|
|
Q(sendto)
|
|
|
|
Q(recv)
|
|
|
|
Q(recvfrom)
|
|
|
|
Q(listen)
|
|
|
|
Q(accept)
|
|
|
|
Q(bind)
|
|
|
|
Q(settimeout)
|
|
|
|
Q(setblocking)
|
|
|
|
Q(setsockopt)
|
|
|
|
Q(close)
|
2015-07-28 22:06:17 +01:00
|
|
|
Q(makefile)
|
2015-02-06 14:35:48 +00:00
|
|
|
Q(protocol)
|
2015-06-29 21:49:18 +01:00
|
|
|
Q(error)
|
|
|
|
Q(timeout)
|
2015-02-06 14:35:48 +00:00
|
|
|
Q(AF_INET)
|
|
|
|
Q(SOCK_STREAM)
|
|
|
|
Q(SOCK_DGRAM)
|
2015-04-13 15:42:02 +01:00
|
|
|
Q(IPPROTO_SEC)
|
2015-02-06 14:35:48 +00:00
|
|
|
Q(IPPROTO_TCP)
|
|
|
|
Q(IPPROTO_UDP)
|
|
|
|
|
2015-06-11 19:26:24 +01: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 14:35:48 +00:00
|
|
|
// for network class
|
|
|
|
Q(network)
|
2015-10-19 10:41:29 +01:00
|
|
|
Q(server)
|
|
|
|
Q(init)
|
|
|
|
Q(deinit)
|
|
|
|
Q(login)
|
|
|
|
Q(timeout)
|
2015-10-19 14:19:34 +01:00
|
|
|
Q(isrunning)
|
2015-02-06 14:35:48 +00:00
|
|
|
|
2015-02-22 17:43:01 +00:00
|
|
|
// for WLAN class
|
2015-02-06 14:35:48 +00:00
|
|
|
Q(WLAN)
|
2015-09-26 21:55:24 +01:00
|
|
|
Q(id)
|
|
|
|
Q(init)
|
|
|
|
Q(mode)
|
|
|
|
Q(auth)
|
2015-02-06 14:35:48 +00:00
|
|
|
Q(ssid)
|
|
|
|
Q(bssid)
|
2015-09-26 21:55:24 +01:00
|
|
|
Q(mac)
|
|
|
|
Q(antenna)
|
2015-02-06 14:35:48 +00:00
|
|
|
Q(scan)
|
|
|
|
Q(connect)
|
2015-02-23 10:22:15 +00:00
|
|
|
Q(isconnected)
|
2015-02-06 14:35:48 +00:00
|
|
|
Q(disconnect)
|
2015-10-14 08:45:37 +01:00
|
|
|
Q(sec)
|
2015-02-06 14:35:48 +00:00
|
|
|
Q(channel)
|
2015-04-28 22:52:26 +01:00
|
|
|
Q(rssi)
|
2015-02-23 10:22:15 +00:00
|
|
|
Q(ifconfig)
|
2015-09-26 21:55:24 +01:00
|
|
|
Q(config)
|
|
|
|
//Q(connections)
|
|
|
|
//Q(urn)
|
2015-02-06 14:35:48 +00:00
|
|
|
Q(STA)
|
|
|
|
Q(AP)
|
|
|
|
Q(OPEN)
|
|
|
|
Q(WEP)
|
2015-08-05 12:36:29 +01:00
|
|
|
Q(WPA)
|
|
|
|
Q(WPA2)
|
2015-09-26 21:55:24 +01:00
|
|
|
Q(INT_ANT)
|
|
|
|
Q(EXT_ANT)
|
2015-09-22 22:20:29 +01:00
|
|
|
Q(ANY_EVENT)
|
2015-02-26 14:29:47 +00:00
|
|
|
|
|
|
|
// for WDT class
|
|
|
|
Q(WDT)
|
2015-09-13 16:06:12 +01:00
|
|
|
Q(feed)
|
|
|
|
Q(timeout)
|
2015-02-26 14:29:47 +00:00
|
|
|
|
2015-09-22 22:20:29 +01:00
|
|
|
// for irq class
|
|
|
|
Q(irq)
|
2015-03-04 12:52:39 +00:00
|
|
|
Q(init)
|
|
|
|
Q(enable)
|
|
|
|
Q(disable)
|
2015-09-22 22:20:29 +01:00
|
|
|
Q(flags)
|
|
|
|
Q(trigger)
|
2015-03-04 12:52:39 +00:00
|
|
|
Q(handler)
|
|
|
|
Q(priority)
|
2015-09-22 22:20:29 +01:00
|
|
|
Q(wake)
|
2015-03-04 12:52:39 +00:00
|
|
|
|
2015-03-19 14:17:39 +00:00
|
|
|
// for SPI class
|
|
|
|
Q(SPI)
|
2015-09-13 20:44:09 +01:00
|
|
|
Q(id)
|
2015-05-25 20:06:45 +01:00
|
|
|
Q(mode)
|
2015-03-19 14:17:39 +00:00
|
|
|
Q(baudrate)
|
|
|
|
Q(bits)
|
2015-05-26 09:32:29 +01:00
|
|
|
Q(polarity)
|
|
|
|
Q(phase)
|
2015-09-13 20:44:09 +01:00
|
|
|
Q(firstbit)
|
2015-03-19 14:17:39 +00:00
|
|
|
Q(init)
|
|
|
|
Q(deinit)
|
2015-09-13 20:44:09 +01:00
|
|
|
Q(write)
|
|
|
|
Q(read)
|
|
|
|
Q(readinto)
|
|
|
|
Q(write_readinto)
|
|
|
|
Q(nbytes)
|
|
|
|
Q(buf)
|
2015-05-25 20:06:45 +01:00
|
|
|
Q(MASTER)
|
2015-09-13 20:44:09 +01:00
|
|
|
Q(MSB)
|
2015-03-19 14:17:39 +00:00
|
|
|
|
2015-05-09 16:46:16 +01:00
|
|
|
// for Timer class
|
|
|
|
Q(Timer)
|
|
|
|
Q(TimerChannel)
|
|
|
|
Q(init)
|
|
|
|
Q(deinit)
|
|
|
|
Q(freq)
|
2015-05-29 14:47:07 +01:00
|
|
|
Q(period)
|
2015-05-09 16:46:16 +01: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 23:23:13 +01:00
|
|
|
// for uhashlib module
|
2015-09-27 17:04:11 +01:00
|
|
|
//Q(uhashlib)
|
|
|
|
//Q(update)
|
|
|
|
//Q(digest)
|
2015-05-19 23:23:13 +01:00
|
|
|
//Q(md5)
|
2015-09-27 17:04:11 +01:00
|
|
|
//Q(sha1)
|
|
|
|
//Q(sha256)
|
2015-05-22 08:54:10 +01:00
|
|
|
|
|
|
|
// for ubinascii module
|
|
|
|
Q(ubinascii)
|
|
|
|
Q(hexlify)
|
|
|
|
Q(unhexlify)
|
2015-07-04 15:33:54 +01:00
|
|
|
Q(a2b_base64)
|
|
|
|
Q(b2a_base64)
|
|
|
|
|