bxError.go 1.1 KB

12345678910111213141516171819202122232425262728293031
  1. package bx
  2. type BxError struct {
  3. ErrorCode byte
  4. Name string
  5. Description string
  6. }
  7. var bxErrors = []BxError{
  8. BxError{0, "ERR_NO", "No Err"},
  9. BxError{1, "ERR_OUTOFGROUP", "Command Group Err"},
  10. BxError{2, "ERR_NOCMD", "Not Found"},
  11. BxError{3, "ERR_BUSY", "The Controller is busy now"},
  12. BxError{4, "ERR_MEMORYVOLUME", "Out of the Memory Volume"},
  13. BxError{5, "ERR_CHECKSUM", "CRC16 Checksum Err"},
  14. BxError{6, "ERR_FILENOTEXIST", "File Not Exist"},
  15. BxError{7, "ERR_FLASH", "Flash Access Err"},
  16. BxError{8, "ERR_FILE_DOWNLOAD", "File Download Err"},
  17. BxError{9, "ERR_FILE_NAME", "Filename Err"},
  18. BxError{10, "ERR_FILE_TYPE", "File type Err"},
  19. BxError{11, "ERR_FILE_CRC16", "File CRC16 Err"},
  20. BxError{12, "ERR_FONT_NOT_EXIST", "Font Library Not Exist"},
  21. BxError{13, "ERR_FIRMWARE_TYPE", "Firmware Type Err (Check the controller type)"},
  22. BxError{14, "ERR_DATE_TIME_FORMAT", "Date Time format Err"},
  23. BxError{15, "ERR_FILE_EXIST", "File Exist for File overwrite"},
  24. BxError{16, "ERR_FILE_BLOCK_NUM", "File block number Err"},
  25. }
  26. func GetError(code byte) BxError {
  27. return bxErrors[code]
  28. }