RT-AICHIP-sample
usbreg.h ファイル
被依存関係図:

[ソースコード]

マクロ定義

#define FRAME_INT   (0x1<<0)
 
#define EP0_INT   (0x1<<1)
 
#define EP1_INT   (0x1<<2)
 
#define EP2_INT   (0x1<<3)
 
#define EP3_INT   (0x1<<4)
 
#define EP4_INT   (0x1<<5)
 
#define EP5_INT   (0x1<<6)
 
#define EP6_INT   (0x1<<7)
 
#define EP7_INT   (0x1<<8)
 
#define DEV_STAT_INT   (0x1<<9)
 
#define CCEMTY_INT   (0x1<<10)
 
#define CDFULL_INT   (0x1<<11)
 
#define RxENDPKT_INT   (0x1<<12)
 
#define TxENDPKT_INT   (0x1<<13)
 
#define PKT_LNGTH_MASK   0x000003FF
 
#define PKT_DV   0x00000400
 
#define PKT_RDY   0x00000800
 
#define CTRL_RD_EN   0x00000001
 
#define CTRL_WR_EN   0x00000002
 
#define CMD_SET_ADDR   0x00D00500
 
#define CMD_CFG_DEV   0x00D80500
 
#define CMD_SET_MODE   0x00F30500
 
#define CMD_RD_INT   0x00F40500
 
#define DAT_RD_INT   0x00F40200
 
#define CMD_RD_FRAME   0x00F50500
 
#define DAT_RD_FRAME   0x00F50200
 
#define CMD_RD_CHIP_ID   0x00FD0500
 
#define DAT_RD_CHIP_ID   0x00FD0200
 
#define CMD_SET_DEV_STAT   0x00FE0500
 
#define CMD_GET_DEV_STAT   0x00FE0500
 
#define DAT_GET_DEV_STAT   0x00FE0200
 
#define CMD_GET_ERR_CODE   0x00FF0500
 
#define DAT_GET_ERR_CODE   0x00FF0200
 
#define DAT_WR_BYTE(x)    (0x00000100 | ((x) << 16))
 
#define CMD_SEL_EP(x)    (0x00000500 | ((x) << 16))
 
#define DAT_SEL_EP(x)    (0x00000200 | ((x) << 16))
 
#define CMD_SEL_EP_CLRI(x)   (0x00400500 | ((x) << 16))
 
#define DAT_SEL_EP_CLRI(x)   (0x00400200 | ((x) << 16))
 
#define CMD_SET_EP_STAT(x)   (0x00400500 | ((x) << 16))
 
#define CMD_CLR_BUF   0x00F20500
 
#define CMD_VALID_BUF   0x00FA0500
 
#define DEV_ADDR_MASK   0x7F
 
#define DEV_EN   0x80
 
#define CONF_DVICE   0x01
 
#define AP_CLK   0x01
 
#define INAK_CI   0x02
 
#define INAK_CO   0x04
 
#define INAK_AI   0x08
 
#define INAK_AO   0x10
 
#define DEV_CON   0x01
 
#define DEV_CON_CH   0x02
 
#define DEV_SUS   0x04
 
#define DEV_SUS_CH   0x08
 
#define DEV_RST   0x10
 
#define ERR_EC_MASK   0x0F
 
#define ERR_EA   0x10
 
#define ERR_NOERROR   0x00
 
#define ERR_PID_ENCODE   0x01
 
#define ERR_UNKNOWN_PID   0x02
 
#define ERR_UNEXPECT_PKT   0x03
 
#define ERR_TCRC   0x04
 
#define ERR_DCRC   0x05
 
#define ERR_TIMEOUT   0x06
 
#define ERR_BABBIE   0x07
 
#define ERR_EOF_PKT   0x08
 
#define ERR_TX_RX_NAK   0x09
 
#define ERR_SENT_STALL   0x0A
 
#define ERR_BUF_OVERRUN   0x0B
 
#define ERR_SENT_EPT_PKT   0x0C
 
#define ERR_BIT_STUFF   0x0D
 
#define ERR_SYNC   0x0E
 
#define ERR_TOGGLE_BIT   0x0F
 
#define EP_SEL_F   0x01
 
#define EP_SEL_ST   0x02
 
#define EP_SEL_STP   0x04
 
#define EP_SEL_PO   0x08
 
#define EP_SEL_EPN   0x10
 
#define EP_SEL_B_1_FULL   0x20
 
#define EP_SEL_B_2_FULL   0x40
 
#define EP_STAT_ST   0x01
 
#define EP_STAT_DA   0x20
 
#define EP_STAT_RF_MO   0x40
 
#define EP_STAT_CND_ST   0x80
 
#define CLR_BUF_PO   0x01
 

マクロ定義詳解

#define AP_CLK   0x01

usbreg.h81 行目に定義があります。

#define CCEMTY_INT   (0x1<<10)

usbreg.h33 行目に定義があります。

#define CDFULL_INT   (0x1<<11)

usbreg.h34 行目に定義があります。

#define CLR_BUF_PO   0x01

usbreg.h132 行目に定義があります。

#define CMD_CFG_DEV   0x00D80500

usbreg.h49 行目に定義があります。

#define CMD_CLR_BUF   0x00F20500

usbreg.h70 行目に定義があります。

#define CMD_GET_DEV_STAT   0x00FE0500

usbreg.h59 行目に定義があります。

#define CMD_GET_ERR_CODE   0x00FF0500

usbreg.h61 行目に定義があります。

#define CMD_RD_CHIP_ID   0x00FD0500

usbreg.h55 行目に定義があります。

#define CMD_RD_FRAME   0x00F50500

usbreg.h53 行目に定義があります。

#define CMD_RD_INT   0x00F40500

usbreg.h51 行目に定義があります。

#define CMD_SEL_EP (   x)    (0x00000500 | ((x) << 16))

usbreg.h65 行目に定義があります。

#define CMD_SEL_EP_CLRI (   x)    (0x00400500 | ((x) << 16))

usbreg.h67 行目に定義があります。

#define CMD_SET_ADDR   0x00D00500

usbreg.h48 行目に定義があります。

#define CMD_SET_DEV_STAT   0x00FE0500

usbreg.h58 行目に定義があります。

#define CMD_SET_EP_STAT (   x)    (0x00400500 | ((x) << 16))

usbreg.h69 行目に定義があります。

#define CMD_SET_MODE   0x00F30500

usbreg.h50 行目に定義があります。

#define CMD_VALID_BUF   0x00FA0500

usbreg.h71 行目に定義があります。

#define CONF_DVICE   0x01

usbreg.h78 行目に定義があります。

#define CTRL_RD_EN   0x00000001

usbreg.h44 行目に定義があります。

#define CTRL_WR_EN   0x00000002

usbreg.h45 行目に定義があります。

#define DAT_GET_DEV_STAT   0x00FE0200

usbreg.h60 行目に定義があります。

#define DAT_GET_ERR_CODE   0x00FF0200

usbreg.h62 行目に定義があります。

#define DAT_RD_CHIP_ID   0x00FD0200

usbreg.h56 行目に定義があります。

#define DAT_RD_FRAME   0x00F50200

usbreg.h54 行目に定義があります。

#define DAT_RD_INT   0x00F40200

usbreg.h52 行目に定義があります。

#define DAT_SEL_EP (   x)    (0x00000200 | ((x) << 16))

usbreg.h66 行目に定義があります。

#define DAT_SEL_EP_CLRI (   x)    (0x00400200 | ((x) << 16))

usbreg.h68 行目に定義があります。

#define DAT_WR_BYTE (   x)    (0x00000100 | ((x) << 16))

usbreg.h64 行目に定義があります。

#define DEV_ADDR_MASK   0x7F

usbreg.h74 行目に定義があります。

#define DEV_CON   0x01

usbreg.h88 行目に定義があります。

#define DEV_CON_CH   0x02

usbreg.h89 行目に定義があります。

#define DEV_EN   0x80

usbreg.h75 行目に定義があります。

#define DEV_RST   0x10

usbreg.h92 行目に定義があります。

#define DEV_STAT_INT   (0x1<<9)

usbreg.h32 行目に定義があります。

#define DEV_SUS   0x04

usbreg.h90 行目に定義があります。

#define DEV_SUS_CH   0x08

usbreg.h91 行目に定義があります。

#define EP0_INT   (0x1<<1)

usbreg.h24 行目に定義があります。

#define EP1_INT   (0x1<<2)

usbreg.h25 行目に定義があります。

#define EP2_INT   (0x1<<3)

usbreg.h26 行目に定義があります。

#define EP3_INT   (0x1<<4)

usbreg.h27 行目に定義があります。

#define EP4_INT   (0x1<<5)

usbreg.h28 行目に定義があります。

#define EP5_INT   (0x1<<6)

usbreg.h29 行目に定義があります。

#define EP6_INT   (0x1<<7)

usbreg.h30 行目に定義があります。

#define EP7_INT   (0x1<<8)

usbreg.h31 行目に定義があります。

#define EP_SEL_B_1_FULL   0x20

usbreg.h122 行目に定義があります。

#define EP_SEL_B_2_FULL   0x40

usbreg.h123 行目に定義があります。

#define EP_SEL_EPN   0x10

usbreg.h121 行目に定義があります。

#define EP_SEL_F   0x01

usbreg.h117 行目に定義があります。

#define EP_SEL_PO   0x08

usbreg.h120 行目に定義があります。

#define EP_SEL_ST   0x02

usbreg.h118 行目に定義があります。

#define EP_SEL_STP   0x04

usbreg.h119 行目に定義があります。

#define EP_STAT_CND_ST   0x80

usbreg.h129 行目に定義があります。

#define EP_STAT_DA   0x20

usbreg.h127 行目に定義があります。

#define EP_STAT_RF_MO   0x40

usbreg.h128 行目に定義があります。

#define EP_STAT_ST   0x01

usbreg.h126 行目に定義があります。

#define ERR_BABBIE   0x07

usbreg.h106 行目に定義があります。

#define ERR_BIT_STUFF   0x0D

usbreg.h112 行目に定義があります。

#define ERR_BUF_OVERRUN   0x0B

usbreg.h110 行目に定義があります。

#define ERR_DCRC   0x05

usbreg.h104 行目に定義があります。

#define ERR_EA   0x10

usbreg.h96 行目に定義があります。

#define ERR_EC_MASK   0x0F

usbreg.h95 行目に定義があります。

#define ERR_EOF_PKT   0x08

usbreg.h107 行目に定義があります。

#define ERR_NOERROR   0x00

usbreg.h99 行目に定義があります。

#define ERR_PID_ENCODE   0x01

usbreg.h100 行目に定義があります。

#define ERR_SENT_EPT_PKT   0x0C

usbreg.h111 行目に定義があります。

#define ERR_SENT_STALL   0x0A

usbreg.h109 行目に定義があります。

#define ERR_SYNC   0x0E

usbreg.h113 行目に定義があります。

#define ERR_TCRC   0x04

usbreg.h103 行目に定義があります。

#define ERR_TIMEOUT   0x06

usbreg.h105 行目に定義があります。

#define ERR_TOGGLE_BIT   0x0F

usbreg.h114 行目に定義があります。

#define ERR_TX_RX_NAK   0x09

usbreg.h108 行目に定義があります。

#define ERR_UNEXPECT_PKT   0x03

usbreg.h102 行目に定義があります。

#define ERR_UNKNOWN_PID   0x02

usbreg.h101 行目に定義があります。

#define FRAME_INT   (0x1<<0)

usbreg.h23 行目に定義があります。

#define INAK_AI   0x08

usbreg.h84 行目に定義があります。

#define INAK_AO   0x10

usbreg.h85 行目に定義があります。

#define INAK_CI   0x02

usbreg.h82 行目に定義があります。

#define INAK_CO   0x04

usbreg.h83 行目に定義があります。

#define PKT_DV   0x00000400

usbreg.h40 行目に定義があります。

#define PKT_LNGTH_MASK   0x000003FF

usbreg.h39 行目に定義があります。

#define PKT_RDY   0x00000800

usbreg.h41 行目に定義があります。

#define RxENDPKT_INT   (0x1<<12)

usbreg.h35 行目に定義があります。

#define TxENDPKT_INT   (0x1<<13)

usbreg.h36 行目に定義があります。