iuu_phoenix.h 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118
  1. // SPDX-License-Identifier: GPL-2.0+
  2. /*
  3. * Infinity Unlimited USB Phoenix driver
  4. *
  5. * Copyright (C) 2007 Alain Degreffe (eczema@ecze.com)
  6. *
  7. *
  8. * Original code taken from iuutool ( Copyright (C) 2006 Juan Carlos Borrás )
  9. *
  10. * And tested with help of WB Electronics
  11. */
  12. #define IUU_USB_VENDOR_ID 0x104f
  13. #define IUU_USB_PRODUCT_ID 0x0004
  14. #define IUU_USB_OP_TIMEOUT 0x0200
  15. /* Programmer commands */
  16. #define IUU_NO_OPERATION 0x00
  17. #define IUU_GET_FIRMWARE_VERSION 0x01
  18. #define IUU_GET_PRODUCT_NAME 0x02
  19. #define IUU_GET_STATE_REGISTER 0x03
  20. #define IUU_SET_LED 0x04
  21. #define IUU_WAIT_MUS 0x05
  22. #define IUU_WAIT_MS 0x06
  23. #define IUU_GET_LOADER_VERSION 0x50
  24. #define IUU_RST_SET 0x52
  25. #define IUU_RST_CLEAR 0x53
  26. #define IUU_SET_VCC 0x59
  27. #define IUU_UART_ENABLE 0x49
  28. #define IUU_UART_DISABLE 0x4A
  29. #define IUU_UART_WRITE_I2C 0x4C
  30. #define IUU_UART_ESC 0x5E
  31. #define IUU_UART_TRAP 0x54
  32. #define IUU_UART_TRAP_BREAK 0x5B
  33. #define IUU_UART_RX 0x56
  34. #define IUU_AVR_ON 0x21
  35. #define IUU_AVR_OFF 0x22
  36. #define IUU_AVR_1CLK 0x23
  37. #define IUU_AVR_RESET 0x24
  38. #define IUU_AVR_RESET_PC 0x25
  39. #define IUU_AVR_INC_PC 0x26
  40. #define IUU_AVR_INCN_PC 0x27
  41. #define IUU_AVR_PREAD 0x29
  42. #define IUU_AVR_PREADN 0x2A
  43. #define IUU_AVR_PWRITE 0x28
  44. #define IUU_AVR_DREAD 0x2C
  45. #define IUU_AVR_DREADN 0x2D
  46. #define IUU_AVR_DWRITE 0x2B
  47. #define IUU_AVR_PWRITEN 0x2E
  48. #define IUU_EEPROM_ON 0x37
  49. #define IUU_EEPROM_OFF 0x38
  50. #define IUU_EEPROM_WRITE 0x39
  51. #define IUU_EEPROM_WRITEX 0x3A
  52. #define IUU_EEPROM_WRITE8 0x3B
  53. #define IUU_EEPROM_WRITE16 0x3C
  54. #define IUU_EEPROM_WRITEX32 0x3D
  55. #define IUU_EEPROM_WRITEX64 0x3E
  56. #define IUU_EEPROM_READ 0x3F
  57. #define IUU_EEPROM_READX 0x40
  58. #define IUU_EEPROM_BREAD 0x41
  59. #define IUU_EEPROM_BREADX 0x42
  60. #define IUU_PIC_CMD 0x0A
  61. #define IUU_PIC_CMD_LOAD 0x0B
  62. #define IUU_PIC_CMD_READ 0x0C
  63. #define IUU_PIC_ON 0x0D
  64. #define IUU_PIC_OFF 0x0E
  65. #define IUU_PIC_RESET 0x16
  66. #define IUU_PIC_INC_PC 0x0F
  67. #define IUU_PIC_INCN_PC 0x10
  68. #define IUU_PIC_PWRITE 0x11
  69. #define IUU_PIC_PREAD 0x12
  70. #define IUU_PIC_PREADN 0x13
  71. #define IUU_PIC_DWRITE 0x14
  72. #define IUU_PIC_DREAD 0x15
  73. #define IUU_UART_NOP 0x00
  74. #define IUU_UART_CHANGE 0x02
  75. #define IUU_UART_TX 0x04
  76. #define IUU_DELAY_MS 0x06
  77. #define IUU_OPERATION_OK 0x00
  78. #define IUU_DEVICE_NOT_FOUND 0x01
  79. #define IUU_INVALID_HANDLE 0x02
  80. #define IUU_INVALID_PARAMETER 0x03
  81. #define IUU_INVALID_voidERFACE 0x04
  82. #define IUU_INVALID_REQUEST_LENGTH 0x05
  83. #define IUU_UART_NOT_ENABLED 0x06
  84. #define IUU_WRITE_ERROR 0x07
  85. #define IUU_READ_ERROR 0x08
  86. #define IUU_TX_ERROR 0x09
  87. #define IUU_RX_ERROR 0x0A
  88. #define IUU_PARITY_NONE 0x00
  89. #define IUU_PARITY_EVEN 0x01
  90. #define IUU_PARITY_ODD 0x02
  91. #define IUU_PARITY_MARK 0x03
  92. #define IUU_PARITY_SPACE 0x04
  93. #define IUU_SC_INSERTED 0x01
  94. #define IUU_VERIFY_ERROR 0x02
  95. #define IUU_SIM_INSERTED 0x04
  96. #define IUU_TWO_STOP_BITS 0x00
  97. #define IUU_ONE_STOP_BIT 0x20
  98. #define IUU_BAUD_2400 0x0398
  99. #define IUU_BAUD_9600 0x0298
  100. #define IUU_BAUD_19200 0x0164
  101. #define IUU_BAUD_28800 0x0198
  102. #define IUU_BAUD_38400 0x01B2
  103. #define IUU_BAUD_57600 0x0030
  104. #define IUU_BAUD_115200 0x0098
  105. #define IUU_CLK_3579000 3579000
  106. #define IUU_CLK_3680000 3680000
  107. #define IUU_CLK_6000000 6000000
  108. #define IUU_FULLCARD_IN 0x01
  109. #define IUU_DEV_ERROR 0x02
  110. #define IUU_MINICARD_IN 0x04
  111. #define IUU_VCC_5V 0x00
  112. #define IUU_VCC_3V 0x01