Commell MPX-2515 Manual do Utilizador Página 10

  • Descarregar
  • Adicionar aos meus manuais
  • Imprimir
  • Página
    / 38
  • Índice
  • MARCADORES
  • Avaliado. / 5. Com base em avaliações de clientes
Vista de página 9
Commell MPX-2515 User’s Guide Rev 0100
Taiwan Commate Computer Inc.
10
1.5.3 CAN_SET_LED_SWITCH
The CAN_SET_LED_SWITCH command turns the main LED switch on or off.
Every individual LED indicator will be in the off state if application sets the main
LED switch to the OFF state via this command. Please be noted that the main LED
switch is default to ON state each time the MPX-2515 card be powered on.
#define CCP_CAN_SYSTEM_SERVICE 0X20 /* COMMAND: service code */
#define CAN_SET_LED_SWITCH 0X03 /* DATA_0: sub-command code */
#define LED_SWITCH_OFF 0X00 /* @ DATA_1 */
#define LED_SWITCH_ON 0X01 /* @ DATA_1 */
#define EP2 2 /* Endpoint 2 */
#define EP3 3 /* Endpoint 3 */
OFFSET BULK OUT (EP2) BULK IN (EP1)
SIZEOF_DATA 0X02 0X01
COMMAND 0X20 0X20
ERROR 0X00 Error code
DATA_0 0X03 Number of byte written (0X01)
DATA_1 0X00 / 0X01 Checksum
DATA_2 Checksum
DATA_3
DATA_4
DATA_5
1.5.4 CAN_SET_TRANSFER_RATE
The CAN_SET_TRANSFER_RATE command sets the MCP2515 bit transfer rate
on the connecting CAN bus.
MPX-2515 defaults to 125 Kbps transfer rate each time it boots up. Application
issues this command to change to its desired CAN bus transfer rate. There are four
transfer rates that the application can set via this command. Applications need to
program all relevant MCP2515 registers if other transfer rate is desired.
#define CCP_CAN_SYSTEM_SERVICE 0X20 /* COMMAND: service code */
#define CAN_SET_TRANSFER_RATE 0X04 /* DATA_0: sub-command code */
#define CAN_1000K_BPS 0X00 /* @DATA_1 */
#define CAN_500K_BPS 0X01 /* @DATA_1 */
#define CAN_250K_BPS 0X03 /* @DATA_1 */
#define CAN_125K_BPS 0X07 /* @DATA_1 */
#define EP2 2 /* Endpoint 2 */
#define EP3 3 /* Endpoint 3 */
OFFSET BULK OUT (EP2) BULK IN (EP1)
SIZEOF_DATA 0X02 0X01
COMMAND 0X20 0X20
Vista de página 9
1 2 ... 5 6 7 8 9 10 11 12 13 14 15 ... 37 38

Comentários a estes Manuais

Sem comentários