
Page 28
Copyright © 2017 Matrix Technology Solutions Limited
www.matrixtsl.com
API Documentation
Peripheral
MIAC AllCode
Instructional Guide
SD Card
Return
Command
Parameter(s)
Description
Status
CardInserted
Checks to see if an SD card is inserted
Status = 0 to 1 - 0=No Card / 1=Card Present
Status
CardOpen
Filename
Attempts to open a file from the SD card
Filename = “filename.txt”
Status = 0 to 255 - 0=OK / 239=FileNotFound
Value
CardReadByte
Reads a byte from the open file
Value = 0 to 255
Status
CardWriteByte
Value
Appends a byte to the end of the open file
Value = 0 to 255
Status = 0 to 255 - 0=OK / >0=Error
Status
CardCreate
Filename
Attempts to create a file from the SD card
Filename = “filename.txt”
Status = 0 to 255 - 0=OK / 1=FileExists
Status
CardDelete
Filename
Attempts to delete a file from the SD card
Filename = “filename.txt”
Status = 0 to 255 - 0=OK / 239=FileNotFound
Real Time Clock
Return
Command
Parameter(s)
Description
Value
ReadRTC
Unit
Reads a value from the real time clock
Unit = 0 to 5 - 0=Sec / 1=Min / 2=Hour / 3=Day /
4=Month / 5=Year
Value = 0 to 99
WriteRTC
Unit
Value
Writes a value to the real time clock
Unit = 0 to 5 - 0=Sec / 1=Min / 2=Hour / 3=Day /
4=Month / 5=Year
Value = 0 to 99
Serial Communications
Return
Command
Parameter(s)
Description
Value
CommsRead
Timeout
Reads a byte from the alt communications bus
Timeout = 0 to 255
Value = 0 to 255
CommsWrite
Value
Writes a value to the alt communications bus
Value = 0 to 255
CommsBaud
Baud
Sets the speed of the alt communications bus
Baud = 0 to 7 - 0=1200 / 1=2400 / 2=4800 / 3=9600
4=19200 / 5=38400 / 6=57600 / 7=115200
Keypad
Return
Command
Parameter(s)
Description
KeyPress
ReadKey
Reads the last recorded keypress from the keypad buffer
KeyPress = 0 to 255 - 0=F2 / 1=Left / 2=F1 / 3=Down /
4=OK / 5=Up / 6=Return / 7=Right / 8=Menu /
255=No Press
Содержание MI3932 MIAC AllCode
Страница 1: ......