Reference firmware for PixArt's PAT9130EW sensor and evaluation board. "Hello World" and "Library" contain the exact same files. Please import just one of the two into your mBed compiler as a new program and not as a library.
commHeaders/registerArrays.h@1:efa5e5a1e308, 2018-07-18 (annotated)
- Committer:
- PixArtVY
- Date:
- Wed Jul 18 18:33:03 2018 +0000
- Revision:
- 1:efa5e5a1e308
- Parent:
- 0:5a34a4387fb0
Added Apache License notice.
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
PixArtVY | 0:5a34a4387fb0 | 1 | const uint8_t initialize[][2] = { |
PixArtVY | 0:5a34a4387fb0 | 2 | { 0x7F, 0x00 }, // switch to bank0, not allowed to perform SPIWriteRead |
PixArtVY | 0:5a34a4387fb0 | 3 | { 0x05, 0xA8 }, // sleep mode disabled |
PixArtVY | 0:5a34a4387fb0 | 4 | { 0x09, 0x5A }, // disable write protect |
PixArtVY | 0:5a34a4387fb0 | 5 | { 0x51, 0x06 }, // set LD current source to 6 |
PixArtVY | 0:5a34a4387fb0 | 6 | { 0x0D, 0x1F }, // CPI resolution setting for X-direction |
PixArtVY | 0:5a34a4387fb0 | 7 | { 0x0E, 0x1F }, // CPI resolution setting for Y-direction |
PixArtVY | 0:5a34a4387fb0 | 8 | { 0x07, 0x00 }, |
PixArtVY | 0:5a34a4387fb0 | 9 | { 0x1B, 0x42 }, |
PixArtVY | 0:5a34a4387fb0 | 10 | { 0x2E, 0x40 }, |
PixArtVY | 0:5a34a4387fb0 | 11 | { 0x32, 0x40 }, |
PixArtVY | 0:5a34a4387fb0 | 12 | { 0x33, 0x02 }, |
PixArtVY | 0:5a34a4387fb0 | 13 | { 0x34, 0x00 }, |
PixArtVY | 0:5a34a4387fb0 | 14 | { 0x36, 0xE0 }, |
PixArtVY | 0:5a34a4387fb0 | 15 | { 0x38, 0xA0 }, |
PixArtVY | 0:5a34a4387fb0 | 16 | { 0x39, 0x01 }, |
PixArtVY | 0:5a34a4387fb0 | 17 | { 0x3E, 0x14 }, |
PixArtVY | 0:5a34a4387fb0 | 18 | { 0x44, 0x02 }, |
PixArtVY | 0:5a34a4387fb0 | 19 | { 0x4A, 0xE0 }, |
PixArtVY | 0:5a34a4387fb0 | 20 | { 0x4F, 0x02 }, |
PixArtVY | 0:5a34a4387fb0 | 21 | { 0x52, 0x0D }, // Turn off internal VDDA |
PixArtVY | 0:5a34a4387fb0 | 22 | { 0x57, 0x03 }, |
PixArtVY | 0:5a34a4387fb0 | 23 | { 0x59, 0x03 }, |
PixArtVY | 0:5a34a4387fb0 | 24 | { 0x5B, 0x03 }, |
PixArtVY | 0:5a34a4387fb0 | 25 | { 0x5C, 0xFF }, |
PixArtVY | 0:5a34a4387fb0 | 26 | |
PixArtVY | 0:5a34a4387fb0 | 27 | { 0x7F, 0x01 }, // switch to bank1, not allowed to perform SPIWriteRead |
PixArtVY | 0:5a34a4387fb0 | 28 | { 0x00, 0x25 }, |
PixArtVY | 0:5a34a4387fb0 | 29 | { 0x07, 0x78 }, |
PixArtVY | 0:5a34a4387fb0 | 30 | { 0x20, 0x00 }, |
PixArtVY | 0:5a34a4387fb0 | 31 | { 0x21, 0x40 }, |
PixArtVY | 0:5a34a4387fb0 | 32 | { 0x23, 0x00 }, |
PixArtVY | 0:5a34a4387fb0 | 33 | { 0x2F, 0x64 }, |
PixArtVY | 0:5a34a4387fb0 | 34 | { 0x37, 0x30 }, |
PixArtVY | 0:5a34a4387fb0 | 35 | { 0x3B, 0x64 }, |
PixArtVY | 0:5a34a4387fb0 | 36 | { 0x43, 0x0A }, |
PixArtVY | 0:5a34a4387fb0 | 37 | { 0x59, 0x01 }, |
PixArtVY | 0:5a34a4387fb0 | 38 | { 0x5A, 0x01 }, |
PixArtVY | 0:5a34a4387fb0 | 39 | { 0x5C, 0x04 }, |
PixArtVY | 0:5a34a4387fb0 | 40 | { 0x5E, 0x04 }, |
PixArtVY | 0:5a34a4387fb0 | 41 | |
PixArtVY | 0:5a34a4387fb0 | 42 | { 0x7F, 0x02 }, // switch to bank2, not allowed to perform SPIWriteRead |
PixArtVY | 0:5a34a4387fb0 | 43 | { 0x51, 0x02 }, |
PixArtVY | 0:5a34a4387fb0 | 44 | |
PixArtVY | 0:5a34a4387fb0 | 45 | { 0x7F, 0x03 }, // switch to bank3, not allowed to perform SPIWriteRead |
PixArtVY | 0:5a34a4387fb0 | 46 | { 0x05, 0x0C }, |
PixArtVY | 0:5a34a4387fb0 | 47 | { 0x06, 0x0C }, |
PixArtVY | 0:5a34a4387fb0 | 48 | { 0x07, 0x0C }, |
PixArtVY | 0:5a34a4387fb0 | 49 | { 0x08, 0x0C }, |
PixArtVY | 0:5a34a4387fb0 | 50 | |
PixArtVY | 0:5a34a4387fb0 | 51 | { 0x7F, 0x04 }, // switch to bank4, not allowed to perform SPIWriteRead |
PixArtVY | 0:5a34a4387fb0 | 52 | { 0x05, 0x01 }, |
PixArtVY | 0:5a34a4387fb0 | 53 | { 0x53, 0x08 }, |
PixArtVY | 0:5a34a4387fb0 | 54 | |
PixArtVY | 0:5a34a4387fb0 | 55 | { 0x7F, 0x05 }, // switch to bank5, not allowed to perform SPIWriteRead |
PixArtVY | 0:5a34a4387fb0 | 56 | { 0x00, 0x02 }, |
PixArtVY | 0:5a34a4387fb0 | 57 | { 0x09, 0x01 }, |
PixArtVY | 0:5a34a4387fb0 | 58 | { 0x0A, 0x1C }, |
PixArtVY | 0:5a34a4387fb0 | 59 | { 0x0B, 0x24 }, |
PixArtVY | 0:5a34a4387fb0 | 60 | { 0x0C, 0x1C }, |
PixArtVY | 0:5a34a4387fb0 | 61 | { 0x0D, 0x24 }, |
PixArtVY | 0:5a34a4387fb0 | 62 | { 0x12, 0x08 }, |
PixArtVY | 0:5a34a4387fb0 | 63 | { 0x14, 0x02 }, |
PixArtVY | 0:5a34a4387fb0 | 64 | { 0x16, 0x02 }, |
PixArtVY | 0:5a34a4387fb0 | 65 | { 0x18, 0x1C }, |
PixArtVY | 0:5a34a4387fb0 | 66 | { 0x19, 0x24 }, |
PixArtVY | 0:5a34a4387fb0 | 67 | { 0x1A, 0x1C }, |
PixArtVY | 0:5a34a4387fb0 | 68 | { 0x1B, 0x24 }, |
PixArtVY | 0:5a34a4387fb0 | 69 | { 0x20, 0x08 }, |
PixArtVY | 0:5a34a4387fb0 | 70 | { 0x22, 0x02 }, |
PixArtVY | 0:5a34a4387fb0 | 71 | { 0x24, 0x02 }, |
PixArtVY | 0:5a34a4387fb0 | 72 | { 0x26, 0x88 }, |
PixArtVY | 0:5a34a4387fb0 | 73 | { 0x2F, 0x7C }, |
PixArtVY | 0:5a34a4387fb0 | 74 | { 0x30, 0x07 }, |
PixArtVY | 0:5a34a4387fb0 | 75 | { 0x3D, 0x00 }, |
PixArtVY | 0:5a34a4387fb0 | 76 | { 0x3E, 0x98 }, |
PixArtVY | 0:5a34a4387fb0 | 77 | |
PixArtVY | 0:5a34a4387fb0 | 78 | { 0x7F, 0x06 }, // switch to bank6, not allowed to perform SPIWriteRead |
PixArtVY | 0:5a34a4387fb0 | 79 | { 0x34, 0x03 }, |
PixArtVY | 0:5a34a4387fb0 | 80 | |
PixArtVY | 0:5a34a4387fb0 | 81 | { 0x7F, 0x07 }, // switch to bank7, not allowed to perform SPIWriteRead |
PixArtVY | 0:5a34a4387fb0 | 82 | { 0x00, 0x01 }, |
PixArtVY | 0:5a34a4387fb0 | 83 | { 0x02, 0xC4 }, |
PixArtVY | 0:5a34a4387fb0 | 84 | { 0x03, 0x13 }, |
PixArtVY | 0:5a34a4387fb0 | 85 | { 0x06, 0x0C }, |
PixArtVY | 0:5a34a4387fb0 | 86 | { 0x0F, 0x0A }, |
PixArtVY | 0:5a34a4387fb0 | 87 | { 0x14, 0x02 }, |
PixArtVY | 0:5a34a4387fb0 | 88 | { 0x35, 0x39 }, |
PixArtVY | 0:5a34a4387fb0 | 89 | { 0x36, 0x3F }, |
PixArtVY | 0:5a34a4387fb0 | 90 | { 0x46, 0x03 }, |
PixArtVY | 0:5a34a4387fb0 | 91 | { 0x47, 0x0F }, |
PixArtVY | 0:5a34a4387fb0 | 92 | { 0x4B, 0x97 }, |
PixArtVY | 0:5a34a4387fb0 | 93 | |
PixArtVY | 0:5a34a4387fb0 | 94 | { 0x7F, 0x00 }, // switch to bank0, not allowed to perform SPIWriteRead |
PixArtVY | 0:5a34a4387fb0 | 95 | { 0x09, 0x00 }, // enable write protect |
PixArtVY | 0:5a34a4387fb0 | 96 | }; |
PixArtVY | 0:5a34a4387fb0 | 97 | #define initialize_size (sizeof(initialize)/sizeof(initialize[0])) |