๐ด LuatOS-SOC Interface Documentation#
Click the list on the left to view each interface. To search, use F5 to search.
- Adaptation status
- adc - Analog-to-digital conversion
- antbot - Ant Chain
- audio - Multimedia-Audio
- Constant
- audio.start(id, audio_format, num_channels, sample_rate, bits_per_sample, is_signed)
- audio.record(id, record_type, record_time, amr_quailty, path)
- audio.recordStop(id)
- audio.write(id, data)
- audio.stop(id)
- audio.pause(id, pause)
- audio.on(audio_id, func)
- audio.play(id, path, errStop)
- audio.tts(id, data)
- audio.playStop(id)
- audio.isEnd(id)
- audio.getError(id)
- audio.config(id, paPin, onLevel, dacDelay, paDelay, dacPin, dacLevel, dacTimeDelay)
- audio.vol(id, value)
- audio.micVol(id, value)
- audio.setBus(id, bus_type)
- audio.debug(on_off)
- audio.pm(id,pm_mode)
- bit64 - 32 Basic arithmetic and logical operations on 64-bit data on bit systems
- camera - Camera
- Constant
- camera.init(InitReg_or_cspi_id, cspi_speed, mode, is_msb, rx_bit, seq_type, is_ddr, only_y, scan_mode, w, h)
- camera.on(id, event, func)
- camera.start(id)
- camera.stop(id)
- camera.close(id)
- camera.capture(id, save_path, quality)
- camera.video(id, w, h, out_path)
- camera.startRaw(id, w, h, buff)
- camera.getRaw(id)
- camera.preview(id, onoff)
- cc - VoLTE Call function
- codec - Multimedia-Codec
- coremark - Running points
- crypto - Encryption and decryption and hash functions
- crypto.md5(str)
- crypto.hmac_md5(str, key)
- crypto.sha1(str)
- crypto.hmac_sha1(str, key)
- crypto.sha256(str)
- crypto.hmac_sha256(str, key)
- crypto.sha512(str)
- crypto.hmac_sha512(str, key)
- crypto.cipher_encrypt(type, padding, str, key, iv)
- crypto.cipher_decrypt(type, padding, str, key, iv)
- crypto.crc16(method, data, poly, initial, finally, inReversem outReverse)
- crypto.crc16_modbus(data, start)
- crypto.crc32(data)
- crypto.crc8(data, poly, start, revert)
- crypto.crc7(data, poly, start)
- crypto.trng(len)
- crypto.totp(secret,time)
- crypto.base64_encode(data)
- crypto.base64_decode(data)
- crypto.cipher_list()
- crypto.cipher_suites()
- crypto.md_file(tp, path, hmac)
- crypto.md(tp, data, hmac)
- crypto.hash_init(tp)
- crypto.hash_update(stream, data)
- crypto.hash_finish(stream)
- crypto.checksum(data, mode)
- dac - Digital-to-analog conversion
- disp - disp Library (Obsolete)
- eink - ink screen operation library
- Constant
- eink.init(tp, args,spi_device)
- eink.setup(full, spiid, pin_busy, pin_reset, pin_dc, pin_cs)
- eink.sleep()
- eink.clear(color, force)
- eink.setWin(width, height, rotate)
- eink.getWin()
- eink.setFont(font)
- eink.print(x, y, str, colored)
- eink.show(x, y, noClear)
- eink.draw(buff, buff2, noclear)
- eink.line(x, y, x2, y2, colored)
- eink.rect(x, y, x2, y2, colored, fill)
- eink.circle(x, y, radius, colored, fill)
- eink.qrcode(x, y, str, size)
- eink.bat(x, y, bat)
- eink.weather_icon(x, y, code)
- eink.model(m)
- eink.drawXbm(x, y, w, h, data)
- eink.setCtx(index)
- eink.async(index)
- errDump - Error reporting
- fastlz - FastLZ Compression
- fatfs - read/write fatfs format
- fdb - kv Database, power failure does not lose data
- fonts - Font Library
- fota - Underlying Firmware Upgrade
- fs - Additional File System Operations
- fskv - kv Database, power failure does not lose data
- ftp - ftp Client
- gmssl - national secret algorithm(SM2/SM3/SM4)
- gpio - GPIO Operation
- gtfont - Qualcomm Font Chip
- hmeta - Hardware metadata
- ht1621 - LCD Driver(HT1621/HT1621B)
- http - http Client
- httpsrv - http Server
- i2c - I2C Operation
- Constant
- i2c.exist(id)
- i2c.setup(id, speed, pullup)
- i2c.createSoft(scl,sda,delay)
- i2c.send(id, addr, data,stop)
- i2c.recv(id, addr, len)
- i2c.writeReg(id, addr, reg, data,stop)
- i2c.readReg(id, addr, reg, len)
- i2c.close(id)
- i2c.readDHT12(id)
- i2c.readSHT30(id,addr)
- i2c.transfer(id, addr, txBuff, rxBuff, rxLen)
- i2c.xfer(id, addr, txBuff, rxBuff, rxLen, transfer_done_topic, timeout)
- i2c.scan(id,speed)
- i2s - Digital Audio
- iconv - iconv Operation
- io - io action (extended)
- ioqueue - io Sequence operation
- ioqueue.init(hwtimer_id,cmd_cnt,repeat_cnt)
- ioqueue.setdelay(hwtimer_id,time_us,time_tick,continue)
- ioqueue.delay(hwtimer_id)
- ioqueue.setgpio(hwtimer_id,pin,is_input,pull_mode,init_level)
- ioqueue.input(hwtimer_id,pin)
- ioqueue.output(hwtimer_id,pin,level)
- ioqueue.set_cap(hwtimer_id,pin,pull_mode,irq_mode,max_tick)
- ioqueue.capture(hwtimer_id)
- ioqueue.capend(hwtimer_id,pin)
- ioqueue.get(hwtimer_id, input_buff, capture_buff)
- ioqueue.start(hwtimer_id)
- ioqueue.stop(hwtimer_id)
- ioqueue.release(hwtimer_id)
- ioqueue.clear(hwtimer_id)
- ioqueue.done(hwtimer_id)
- ioqueue.exti(pin,pull_mode,irq_mode,onoff)
- iotauth - IoT Authentication library, used to generate parameters for various cloud platforms
- iotauth.aliyun(product_key, device_name,device_secret,method,cur_timestamp)
- iotauth.onenet(produt_id, device_name,key,method,cur_timestamp,version)
- iotauth.iotda(device_id,device_secret,cur_timestamp)
- iotauth.qcloud(product_id, device_name,device_secret,method,cur_timestamp,sdk_appid)
- iotauth.tuya(device_id,device_secret,cur_timestamp)
- iotauth.baidu(iot_core_id, device_key,device_secret,method,cur_timestamp)
- ir - infrared remote control
- json - json Generating and parsing libraries
- keyboard - Keyboard Matrix
- lcd - lcd Drive module
- Constant
- lcd.init(tp, args, spi_dev, init_in_service)
- lcd.close()
- lcd.on()
- lcd.off()
- lcd.sleep()
- lcd.wakeup()
- lcd.invon()
- lcd.invoff()
- lcd.cmd(cmd)
- lcd.data(data)
- lcd.setColor(back,fore)
- lcd.draw(x1, y1, x2, y2,color)
- lcd.clear(color)
- lcd.fill(x1, y1, x2, y2,color)
- lcd.drawPoint(x0,y0,color)
- lcd.drawLine(x0,y0,x1,y1,color)
- lcd.drawRectangle(x0,y0,x1,y1,color)
- lcd.drawCircle(x0,y0,r,color)
- lcd.drawQrcode(x, y, str, size)
- lcd.setFont(font, indentation)
- lcd.drawStr(x,y,str,fg_color)
- lcd.drawGtfontGb2312(str,size,x,y)
- lcd.drawGtfontGb2312Gray(str,size,gray,x,y)
- lcd.drawGtfontUtf8(str,size,x,y)
- lcd.drawGtfontUtf8Gray(str,size,gray,x,y)
- lcd.getSize()
- lcd.drawXbm(x, y, w, h, data)
- lcd.showImage(x, y, file)
- lcd.flush()
- lcd.setupBuff(conf, onheap)
- lcd.autoFlush(enable)
- lcd.rgb565(r, g, b, swap)
- lcdseg - Segment lcd
- libcoap - coap Data processing
- libgnss - NMEA Data processing
- libgnss.parse(str)
- libgnss.isFix()
- libgnss.getIntLocation(speed_type)
- libgnss.getRmc(data_mode)
- libgnss.getGsv()
- libgnss.getGsa(data_mode)
- libgnss.getVtg(data_mode)
- libgnss.getZda()
- libgnss.debug(mode)
- libgnss.getGga(data_mode)
- libgnss.getGll(data_mode)
- libgnss.clear()
- libgnss.bind(id, next_id)
- libgnss.locStr(mode)
- libgnss.rtcAuto(enable)
- libgnss.on(tp, fn)
- libgnss.getTxt()
- libgnss.casic_aid(dt, loc)
- little_flash - LITTLE FLASH Software package
- log - Logstore
- lora - lora Drive module
- lora2 - lora2 Driver module (supports multi-hanging)
- lvgl - LVGL Image Library
- lvgl.draw_mask_radius_param_t()
- lvgl.draw_mask_radius_param_t_free(radius)
- lvgl.draw_mask_line_param_t()
- lvgl.draw_mask_line_param_t_free(line)
- lvgl.draw_mask_fade_param_t()
- lvgl.draw_mask_fade_param_t_free(fade)
- lvgl.font_get(name)
- lvgl.font_load(path/spi_device,size,bpp,thickness,cache_size,sty_zh,sty_en)
- lvgl.font_free(font)
- lvgl.obj_set_event_cb(obj, func)
- lvgl.obj_set_signal_cb(obj, func)
- lvgl.anim_set_exec_cb(anim, func)
- lvgl.anim_set_ready_cb(anim, func)
- lvgl.anim_path_set_cb(path, func)
- lvgl.event_send(obj, ent)
- lvgl.scr_act()
- lvgl.layer_top()
- lvgl.layer_sys()
- lvgl.scr_load(scr)
- lvgl.scr_load_anim(scr)
- lvgl.theme_set_act(name)
- lvgl.sleep(enable)
- lvgl.init(w, h, lcd, buff_size, buff_mode)
- lvgl.anim_create()
- lvgl.anim_free(anim)
- lvgl.anim_path_t()
- lvgl.anim_path_t_free(anim_path_t)
- lvgl.anim_set_path_str(anim, tp)
- lvgl.qrcode_create(parent, size, dark_color, light_color)
- lvgl.qrcode_update(qrcode, cnt)
- lvgl.qrcode_delete(qrcode)
- lvgl.style_t()
- lvgl.style_create()
- lvgl.style_list_create()
- lvgl.style_list_t()
- lvgl.style_delete(style)
- lvgl.style_list_delete(style)
- lvgl.demo_benchmark()
- lvgl.demo_keypad_encoder()
- lvgl.demo_music()
- lvgl.demo_printer()
- lvgl.demo_stress()
- lvgl.demo_widgets()
- lvgl.indev_drv_register(tp, dtp)
- lvgl.indev_point_emulator_update(x, y, state)
- lvgl.indev_kb_update(key)
- lvgl.gif_create(parent, path)
- lvgl.gif_restart(gif)
- max30102 - Heart Rate Module(MAX30102)
- mcu - encapsulation mcu some special operations
- Constant
- mcu.setClk(mhz)
- mcu.getClk()
- mcu.unique_id()
- mcu.ticks()
- mcu.hz()
- mcu.reg32(address, value, mask)
- mcu.x32(value)
- mcu.tick64()
- mcu.dtick64(tick1, tick2, check_value)
- mcu.setXTAL(source_main, source_32k, delay)
- mcu.hardfault(mode)
- mcu.iomux(type, channel, value)
- mcu.altfun(type, sn, pad_index, alt_fun, is_input)
- mcu.ticks2(mode)
- mcu.XTALRefOutput(source_main, source_32k)
- miniz - Easy zlib compression
- mlx90640 - infrared temperature measurement(MLX90640)
- Constant
- mlx90640.init(i2c_id,refresh_rate) (Note: To use this interface after 2023.5.15, the user needs to initialize the i2c interface by himself.)
- mlx90640.feed()
- mlx90640.raw_data()
- mlx90640.raw_point(index)
- mlx90640.ta_temp()
- mlx90640.max_temp()
- mlx90640.min_temp()
- mlx90640.average_temp()
- mlx90640.get_vdd()
- mlx90640.draw2lcd(x, y, fold)
- mobile - Cellular Network
- Constant
- mobile.imei(index)
- mobile.imsi(index)
- mobile.sn()
- mobile.muid()
- mobile.iccid(id)
- mobile.number(id)
- mobile.simid(id)
- mobile.simPin(id,operation,pin1,pin2)
- mobile.rtime(time, auto_reset_stack, data_first)
- mobile.setAuto(check_sim_period, get_cell_period, search_cell_time, auto_reset_stack, network_check_period)
- mobile.apn(index, cid, new_apn_name, user_name, password, ip_type, protocol)
- mobile.ipv6(onff)
- mobile.csq()
- mobile.rssi()
- mobile.rsrp()
- mobile.rsrq()
- mobile.snr()
- mobile.eci()
- mobile.tac()
- mobile.enbid()
- mobile.scell()
- mobile.flymode(index, enable)
- mobile.syncTime(enable)
- mobile.status()
- mobile.getCellInfo()
- mobile.reqCellInfo(timeout)
- mobile.lockCell(mode, earfcn, pci)
- mobile.reset()
- mobile.dataTraffic(clearUplink, clearDownlink)
- mobile.config(item, value)
- mobile.getBand(band, is_default)
- mobile.setBand(band, num)
- mobile.nstOnOff(onoff, uart_id)
- mobile.nstInput(data)
- mobile.vsimInit()
- mobile.vsimOnOff(enable)
- mqtt - mqtt Client
- Constant
- mqttc:subscribe(topic, qos)
- mqttc:unsubscribe(topic)
- mqttc:debug(onoff)
- mqtt.create(adapter,host,port,ssl,isipv6)
- mqttc:auth(client_id,username,password,cleanSession)
- mqttc:keepalive(time)
- mqttc:on(cb)
- mqttc:connect()
- mqttc:disconnect()
- mqttc:autoreconn(reconnect, reconnect_time)
- mqttc:publish(topic, data, qos, retain)
- mqttc:close()
- mqttc:ready()
- mqttc:state()
- mqttc:will(topic, payload, qos, retain)
- os - os Operation
- otp - OTP Operation Library
- pack - Packing and unpacking format string
- pin - Pin Naming Map
- pm - Power Management
- protobuf - ProtoBuffs Codec
- pwm - PWM Module
- repl - โRead-evaluate-output โloop
- rsa - RSA encryption and decryption
- rtc - Real Time Clock
- rtos - RTOS underlying operation library
- rtos.receive(timeout)
- rtos.timer_start(id,timeout,_repeat)
- rtos.timer_stop(id)
- rtos.reboot()
- rtos.buildDate()
- rtos.bsp()
- rtos.version()
- rtos.standy(timeout)
- rtos.meminfo(type)
- rtos.firmware()
- rtos.setPaths(pathA, pathB, pathC, pathD)
- rtos.nop()
- rtos.autoCollectMem(period, warning_level, force_level)
- sdio - sdio
- sensor - Sensor Operation Library
- sensor.ds18b20(pin, check_crc)
- sensor.w1_reset(pin)
- sensor.w1_connect(pin)
- sensor.w1_write(pin, data1,data2)
- sensor.w1_read(pin, len)
- sensor.hx711(pin_date,pin_clk)
- sensor.cs1237(pin_date,pin_clk)
- sensor.ws2812b(pin,data,T0H,T0L,T1H,T1L)
- sensor.ws2812b_pwm(pin,data)
- sensor.ws2812b_spi(pin,data)
- sensor.dht1x(pin)
- sensor.sc12a(sda,scl)
- sensor.yhm27xxx(pin, chip_id, reg, data)
- sfd - SPI FLASH Operation Library
- sfud - SPI FLASH sfud Software package
- sfud.init(spi_id, spi_cs, spi_bandrate)/sfud.init(spi_device)
- sfud.getDeviceNum()
- sfud.getDevice(index)
- sfud.getDeviceTable()
- sfud.chipErase(flash)
- sfud.erase(flash,add,size)
- sfud.read(flash, addr, size)
- sfud.write(flash, addr,data)
- sfud.eraseWrite(flash, addr,data)
- sfud.getInfo(flash)
- sfud.mount(flash, mount_point, offset, maxsize)
- sms - SMS
- socket - Network Interface
- Constant
- socket.sntp(sntp_server)
- socket.ntptm()
- socket.sntp_port(port)
- socket.localIP(adapter)
- socket.create(adapter, cb)
- socket.debug(ctrl, onoff)
- socket.config(ctrl, local_port, is_udp, is_tls, keep_idle, keep_interval, keep_cnt, server_cert, client_cert, client_key, client_password)
- socket.linkup(ctrl)
- socket.connect(ctrl, ip, remote_port, need_ipv6_dns)
- socket.discon(ctrl)
- socket.close(ctrl)
- socket.tx(ctrl, data, ip, port, flag)
- socket.rx(ctrl, buff, flag, limit)
- socket.read(netc, len)
- socket.wait(ctrl)
- socket.listen(ctrl)
- socket.accept(ctrl)
- socket.state(ctrl)
- socket.release(ctrl)
- socket.setDNS(adapter_index, dns_index, ip)
- socket.sslLog(log_level)
- socket.adapter(index)
- socket.remoteIP(ctrl)
- softkb - Software Keyboard Matrix
- spi - spi Operation Library
- Constant
- spi.setup(id, cs, CPHA, CPOL, dataw, bandrate, bitdict, ms, mode)
- spi.createSoft(cs, mosi, miso, clk, CPHA, CPOL, dataw, bitdict, ms, mode)
- spi.close(id)
- spi.transfer(id, send_data, send_len, recv_len)
- spi.recv(id, size, buff)
- spi.send(id, data[, len])
- spi.deviceSetup(id, cs, CPHA, CPOL, dataw, bandrate, bitdict, ms, mode)
- spi_device:close()
- spi_device:transfer(send_data[, len])
- spi_device:send(data[, len])
- spi_device:recv(size)
- spi.xfer(id, txbuff, rxbuff, rx_len, transfer_done_topic)
- statem - SM State Machine
- string - String Manipulation Functions
- string.toHex(str, separator)
- string.fromHex(hex)
- string.split(str, delimiter, keepEmtry)
- string.toValue(str)
- string.urlEncode(โ123 abcโ)
- string.toBase64(str)
- string.fromBase64(str)
- string.toBase32(str)
- string.fromBase32(str)
- string.startsWith(str, prefix)
- string.endsWith(str, suffix)
- string.trim(str, ltrim, rtrim)
- sys - sys Library
- sys.wait(timeout)
- sys.waitUntil(topic, timeout)
- sys.taskInit(func, arg1, arg2, argN)
- sys.timerStart(func, timeout, arg1, arg2, argN)
- sys.timerLoopStart(func, timeout, arg1, arg2, argN)
- sys.timerStop(id)
- sys.timerStopAll(fnc)
- sys.publish(topic, arg1, agr2, argN)
- sys.subscribe(topic, func)
- sys.unsubscribe(topic, func)
- sys.run()
- sysplus - sys A strong complement to the library
- timer - Operating the bottom timer
- touchkey - Touch keys
- u8g2 - u8g2 graphics processing library
- Constant
- u8g2.begin(conf)
- u8g2.close()
- u8g2.ClearBuffer()
- u8g2.SendBuffer()
- u8g2.DrawUTF8(str, x, y)
- u8g2.DrawButtonUTF8(str, x, y, flags, w, h, v, str)
- u8g2.SetFontMode(mode)
- u8g2.SetFont(font, indentation)
- u8g2.GetDisplayHeight()
- u8g2.GetDisplayWidth()
- u8g2.SetDrawColor(c)
- u8g2.DrawPixel(x,y)
- u8g2.DrawLine(x0,y0,x1,y1)
- u8g2.DrawCircle(x0,y0,rad,opt)
- u8g2.DrawDisc(x0,y0,rad,opt)
- u8g2.DrawEllipse(x0,y0,rx,ry,opt)
- u8g2.DrawFilledEllipse(x0,y0,rx,ry,opt)
- u8g2.DrawBox(x,y,w,h)
- u8g2.DrawFrame(x,y,w,h)
- u8g2.DrawRBox(x,y,w,h,r)
- u8g2.DrawRFrame(x,y,w,h,r)
- u8g2.DrawGlyph(x,y,encoding)
- u8g2.DrawTriangle(x0,y0,x1,y1,x2,y2)
- u8g2.SetBitmapMode(mode)
- u8g2.DrawXBM(x, y, w, h, data)
- u8g2.DrawDrcode(x, y, str, size)
- u8g2.SetContrast(contrast)
- u8g2.drawGtfontGb2312(str,size,x,y)
- u8g2.drawGtfontUtf8(str,size,x,y)
- u8g2.CopyBuffer(buff)
- u8g2.SetPowerSave(is_enable)
- uart - serial port operation library
- Constant
- uart.setup(id, baud_rate, data_bits, stop_bits, partiy, bit_order, buff_size, rs485_gpio, rs485_level, rs485_delay, debug_enable, error_drop)
- uart.write(id, data)
- uart.read(id, len)
- uart.close(id)
- uart.on(id, event, func)
- uart.wait485(id)
- uart.exist(id)
- uart.rx(id, buff)
- uart.rxSize(id)
- uart.rxClear(id)
- uart.tx(id, buff, start, len)
- uart.createSoft(tx_pin, tx_hwtimer_id, rx_pin, rx_hwtimer_id, adjust_period)
- uart.list(max)
- usbapp - USB Functional operation
- w5500 - w5500 Ethernet driver
- wdt - watchdog Operation Library
- websocket - websocket Client
- wlan - wifi Operation
- Constant
- wlan.init()
- wlan.setMode(mode)
- wlan.ready()
- wlan.connect(ssid, password, auto_reconnect, bssid)
- wlan.disconnect()
- wlan.scan()
- wlan.scanResult()
- wlan.smartconfig(mode)
- wlan.getMac(tp, hexstr)
- wlan.setMac(tp, mac)
- wlan.getIP()
- wlan.createAP(ssid, passwd, gateway, netmask, channel, opts)
- wlan.stopAP()
- wlan.getInfo()
- wlan.powerSave(mode)
- wlan.hostname(new_name)
- wlan.staIp(dhcp_enable, ip, netmask, gateway)
- xxtea - xxtea encryption and decryption
- ymodem - ymodem Agreement
- zbuff - c Memory Data Manipulation Library
- Constant
- zbuff.create(length,data,type)
- buff:write(para,โฆ)
- buff:read(length)
- buff:clear(num)
- buff:seek(base,offset)
- buff:pack(format,val1, val2,โฆ)
- buff:unpack(format)
- buff:read Type()
- buff:write Type()
- buff:toStr(offset,length)
- buff:len()
- buff:setFrameBuffer(width,height,bit,color)
- buff:pixel(x,y,color)
- buff:drawLine(x1,y1,x2,y2,color)
- buff:drawRect(x1,y1,x2,y2,color,fill)
- buff:drawCircle(x,y,r,color,fill)
- buff[n]
- buff:free()
- buff:resize(n)
- buff:copy(start, para,โฆ)
- buff:used()
- buff:del(offset,length)
- buff:query(offset,length,isbigend,issigned,isfloat)
- buff:set(start, num, len)
- buff:isEqual(start, buff2, start2, len)