123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736 |
- #ifndef _A5133REG_h_
- #define _A5133REG_h_
- #include <stdint.h>
- #define MODE_REG 0x00
- #define MODECTRL_REG 0x01
- #define CALIBRATION_REG 0x02
- #define FIFO1_REG 0x03
- #define FIFO2_REG 0x04
- #define FIFO_REG 0x05
- #define IDCODE_REG 0x06
- #define RCOSC1_REG 0x07
- #define RCOSC2_REG 0x08
- #define RCOSC3_REG 0x09
- #define CKO_REG 0x0A
- #define GIO1_REG 0x0B
- #define GIO2_REG 0x0C
- #define DATARATE_REG 0x0D
- #define PLL1_REG 0x0E
- #define PLL2_REG 0x0F
- #define PLL3_REG 0x10
- #define PLL4_REG 0x11
- #define PLL5_REG 0x12
- #define CHGROUP1_REG 0x13
- #define CHGROUP2_REG 0x14
- #define TX1_REG 0x15
- #define TX2_REG 0x16
- #define DELAY1_REG 0x17
- #define DELAY2_REG 0x18
- #define RX_REG 0x19
- #define RXGAIN1_REG 0x1A
- #define RXGAIN2_REG 0x1B
- #define RXGAIN3_REG 0x1C
- #define RXGAIN4_REG 0x1D
- #define RSSI_REG 0x1E
- #define ADC_REG 0x1F
- #define CODE1_REG 0x20
- #define CODE2_REG 0x21
- #define CODE3_REG 0x22
- #define IFCAL1_REG 0x23
- #define IFCAL2_REG 0x24
- #define VCOCCAL_REG 0x25
- #define VCOCAL1_REG 0x26
- #define VCOCAL2_REG 0x27
- #define VCODEVCAL1_REG 0x28
- #define VCODEVCAL2_REG 0x29
- #define DASP_REG 0x2A
- #define VCOMODDELAY_REG 0x2B
- #define BATTERY_REG 0x2C
- #define TXTEST_REG 0x2D
- #define RXDEM1_REG 0x2E
- #define RXDEM2_REG 0x2F
- #define CPC1_REG 0x30
- #define CPC2_REG 0x31
- #define CRYSTALTEST_REG 0x32
- #define PLLTEST_REG 0x33
- #define VCOTEST_REG 0x34
- #define RFANALOG_REG 0x35
- #define KEYDATA_REG 0x36
- #define CHSELECT_REG 0x37
- #define ROMP_REG 0x38
- #define DATARATECLOCK 0x39
- #define FCR_REG 0x3A
- #define ARD_REG 0x3B
- #define AFEP_REG 0x3C
- #define FCB_REG 0x3D
- #define KEYC_REG 0x3E
- #define USID_REG 0x3F
- #define CMD_SLEEP 0x80
- #define CMD_IDLE 0x90
- #define CMD_STBY 0xA0
- #define CMD_PLL 0xB0
- #define CMD_RX 0xC0
- #define CMD_TX 0xD0
- #define CMD_TFR 0xE0
- #define CMD_RFR 0xF0
- #define CMD_DPSLEEP_TRI 0x88
- #define CMD_DPSLEEP_PULL 0x8B
- typedef union
- {
- uint8_t value;
- struct
- {
- uint8_t resetn : 8;
- }bits_w;
- struct
- {
- uint8_t trer : 1;
-
-
- uint8_t trsr : 1;
-
-
- uint8_t pller : 1;
-
-
- uint8_t xer : 1;
-
-
- uint8_t cer : 1;
-
-
- uint8_t crcf : 1;
-
-
- uint8_t fecf : 1;
-
-
- uint8_t hecf : 1;
-
-
-
- }bits_r;
- }modeReg_tu;
- typedef union
- {
- uint8_t value;
- struct
- {
- uint8_t adcm : 1;
-
-
- uint8_t fms : 1;
-
-
- uint8_t fmt : 1;
- uint8_t wore : 1;
-
-
- uint8_t dfcd : 1;
-
-
-
-
-
- uint8_t aif : 1;
-
-
-
-
-
- uint8_t arssi : 1;
-
-
- uint8_t ddpc : 1;
-
-
- }bits_w;
- struct
- {
- uint8_t adcm : 1;
- uint8_t fms : 1;
- uint8_t fmt : 1;
- uint8_t wore : 1;
- uint8_t cd : 1;
- uint8_t aif : 1;
- uint8_t arssi : 1;
- uint8_t ddpc : 1;
- }bits_r;
- }modeCtrlReg_tu;
- typedef union
- {
- uint8_t value;
- struct
- {
- uint8_t psa : 6;
- uint8_t fpm : 2;
-
-
-
-
- }bits_w;
- struct
- {
- uint8_t fifopt : 8;
-
- }bits_r;
- }fifo2Reg_tu;
- typedef union
- {
- uint8_t value;
- struct
- {
- uint8_t fifo : 8;
-
-
-
- }bits_w;
- struct
- {
- uint8_t fifo : 8;
-
-
-
- }bits_r;
- }fifoReg_tu;
- typedef union
- {
- uint8_t value;
- struct
- {
- uint8_t id : 8;
-
- }bits_w;
- struct
- {
- uint8_t id : 8;
-
- }bits_r;
- }idDataReg_tu;
- typedef union
- {
- uint8_t value;
- struct
- {
- uint8_t wor_sl0_7 : 8;
- }bits_w;
- }rcOsc1Reg_tu;
- typedef union
- {
- uint8_t value;
- struct
- {
- uint8_t wor_ac : 6;
- uint8_t wor_sl8_9 : 2;
-
-
-
- }bits_w;
- }rcOsc2Reg_tu;
- typedef union
- {
- uint8_t value;
- struct
- {
- uint8_t twor_e : 1;
-
-
- uint8_t tsel : 1;
-
-
- uint8_t rcosc_e : 1;
-
-
- uint8_t rcks : 2;
-
-
-
- uint8_t mrc : 1;
-
-
- uint8_t irchc : 1;
- uint8_t resv : 1;
- }bits_w;
- }rcOsc3Reg_tu;
- typedef union
- {
- uint8_t value;
- struct
- {
- uint8_t scki : 1;
-
-
- uint8_t ckoe : 1;
-
-
- uint8_t ckoi : 1;
-
-
- uint8_t ckos : 4;
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- uint8_t eckoe : 1;
-
-
- }bits_w;
- }ckoPinCtrlReg_tu;
- typedef union
- {
- uint8_t value;
- struct
- {
- uint8_t gio1oe : 1;
-
-
- uint8_t gio1i : 1;
-
-
- uint8_t gio1s : 4;
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- uint8_t vpm : 1;
-
-
- uint8_t vkm : 1;
-
-
- }bits_w;
- }gio1PinCtrlReg_tu;
- typedef union
- {
- uint8_t value;
- struct
- {
- uint8_t gio2oe : 1;
-
-
- uint8_t gio2i : 1;
-
-
- uint8_t gio2s : 4;
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- uint8_t bbcks : 2;
-
-
-
-
-
- }bits_w;
- }gio2PinCtrlReg_tu;
- typedef union
- {
- uint8_t value;
- struct
- {
- uint8_t fdp : 3;
- uint8_t tme : 1;
-
-
- uint8_t txdi : 1;
-
-
- uint8_t tmde : 1;
-
-
- uint8_t gf : 1;
- uint8_t gdr : 1;
-
-
- }bits_w;
- }tx1Reg_tu;
- typedef union
- {
- uint8_t value;
- struct
- {
- uint8_t rth : 8;
-
-
- }bits_w;
- struct
- {
- uint8_t adc : 8;
-
- }bits_r;
- }rssiThresHoldReg_tu;
- typedef union
- {
- uint8_t value;
- struct
- {
- uint8_t epml : 2;
-
-
-
-
- uint8_t idl : 2;
-
-
-
-
-
-
- uint8_t crcs : 1;
-
-
- uint8_t fecs : 1;
-
-
- uint8_t whts : 1;
-
-
- uint8_t resv : 1;
- }bits_w;
- struct
- {
- uint8_t snf : 8;
- }bits_r;
- }code1Reg_tu;
- typedef union
- {
- uint8_t value;
- struct
- {
- uint8_t pth : 2;
-
-
-
-
- uint8_t eth : 3;
-
-
-
-
-
-
-
-
- uint8_t hecs : 1;
-
-
- uint8_t edrl : 1;
-
-
- uint8_t mscrc : 1;
-
-
- }bits_w;
- struct
- {
- uint8_t mtcrcf0_7 : 8;
- }bits_r;
- }code2Page0Reg_tu;
- typedef union
- {
- uint8_t value;
- struct
- {
- uint8_t pfine : 3;
- uint8_t resv1 : 1;
- uint8_t tpa : 3;
- uint8_t resv2 : 1;
- }bits_w;
- }code2Page8Reg_tu;
- typedef enum
- {
- PGV_1_2V,
- PGV_1_4V,
- PGV_1_6V,
- PGV_1_8V,
- PGV_2_0V,
- PGV_2_2V,
- PGV_2_4V,
- PGV_2_5V,
- }GPV_te;
- typedef union
- {
- uint8_t value;
- struct
- {
- uint8_t pgv_pa : 3;
- uint8_t pm1sw : 2;
- uint8_t pm1swen : 1;
- uint8_t pmpar : 1;
- uint8_t porips : 1;
- }bits_w;
- }code2Page9Reg_tu;
- typedef union
- {
- uint8_t value;
- struct
- {
- uint8_t ws : 7;
- uint8_t crcinv : 1;
-
-
- }bits_w;
- struct
- {
- uint8_t mtcrcf8_15 : 8;
- }bits_r;
- }code3Page0Reg_tu;
- typedef union
- {
- uint8_t value;
- struct
- {
- uint8_t xrcs : 1;
- uint8_t psdpas : 3;
- uint8_t txlpn : 1;
- uint8_t bias : 1;
- uint8_t bgcs : 1;
- uint8_t txhp : 1;
- }bits_w;
- }code3Page1Reg_tu;
- typedef union
- {
- uint8_t value;
- struct
- {
- uint8_t mfb : 4;
- uint8_t mfbs : 1;
- uint8_t ckgs : 2;
- uint8_t hfr : 1;
- }bits_rw;
- }ifcal1Reg_tu;
- typedef union
- {
- uint8_t value;
- struct
- {
- uint8_t bd_e : 1;
-
-
- uint8_t bvt : 3;
-
-
-
-
-
-
-
-
- uint8_t qds : 1;
-
-
- uint8_t bgs : 1;
-
-
-
- uint8_t pm1s : 1;
-
-
- uint8_t resv : 1;
- }bits_w;
- struct
- {
- uint8_t bd_e : 1;
-
-
- uint8_t bvt : 3;
-
-
-
-
-
-
-
-
- uint8_t bdf : 1;
-
-
- uint8_t resv : 3;
- }bits_r;
- }batteryReg_tu;
- typedef union
- {
- uint8_t value;
- struct
- {
- uint8_t pd_bod : 1;
-
-
- uint8_t regcl : 1;
- uint8_t bdc : 6;
- }bits_w;
- }romp0Reg_tu;
- typedef union
- {
- uint8_t value;
- struct
- {
- uint8_t ear : 1;
-
-
- uint8_t eak : 1;
-
-
- uint8_t arc : 4;
- uint8_t fcl : 2;
-
-
-
-
- }bits_w;
- struct
- {
- uint8_t ear : 1;
-
-
- uint8_t eak : 1;
-
-
- uint8_t rcr : 4;
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- uint8_t vpoak : 1;
-
-
-
- uint8_t artef : 1;
-
-
- }bits_r;
- }fcrReg_tu;
- typedef union
- {
- uint8_t value;
- struct
- {
- uint8_t ackfep : 6;
-
-
- uint8_t spss : 1;
-
-
- uint8_t eaf : 1;
-
-
- }bits_w;
- struct
- {
- uint8_t txsn : 3;
-
- uint8_t earts : 3;
- uint8_t resv : 3;
- }bits_r;
- }afepReg_tu;
- typedef union
- {
- uint8_t value;
- struct
- {
- uint8_t tbf : 3;
-
- uint8_t resv : 2;
- uint8_t txcs : 1;
- uint8_t asmv : 2;
-
-
-
-
- }bits_w;
- }txTestReg_tu;
- #endif
|