├── Hardware ├── README.md ├── SoM_V1.3 │ ├── 1-PCB_PCB_undefined.json │ ├── 1-Schematic_Nano_X1000.json │ ├── Gerber │ │ ├── Drill_PTH_Through.DRL │ │ ├── Drill_PTH_Through_Via.DRL │ │ ├── Gerber_BoardOutlineLayer.GKO │ │ ├── Gerber_BottomLayer.GBL │ │ ├── Gerber_BottomPasteMaskLayer.GBP │ │ ├── Gerber_BottomSilkscreenLayer.GBO │ │ ├── Gerber_BottomSolderMaskLayer.GBS │ │ ├── Gerber_InnerLayer1.G1 │ │ ├── Gerber_InnerLayer2.G2 │ │ ├── Gerber_TopLayer.GTL │ │ ├── Gerber_TopPasteMaskLayer.GTP │ │ ├── Gerber_TopSilkscreenLayer.GTO │ │ ├── Gerber_TopSolderMaskLayer.GTS │ │ └── PCB下单必读.txt │ ├── PCB_PCB_undefined_2022-10-22.pdf │ ├── README.txt │ ├── SMT │ │ ├── BOM_PCB_undefined_2022-10-22.csv │ │ └── PickAndPlace_PCB_undefined_2022-10-22.csv │ └── Schematic_Nano_X1000_2022-10-22.pdf └── V2.0 │ ├── 1-PCB.json │ ├── 1-Schematic_NotKia 168x.json │ ├── Gerber │ ├── Drill_NPTH_Through.DRL │ ├── Drill_PTH_Through.DRL │ ├── Drill_PTH_Through_Via.DRL │ ├── Gerber_BoardOutlineLayer.GKO │ ├── Gerber_BottomLayer.GBL │ ├── Gerber_BottomPasteMaskLayer.GBP │ ├── Gerber_BottomSilkscreenLayer.GBO │ ├── Gerber_BottomSolderMaskLayer.GBS │ ├── Gerber_InnerLayer1.G1 │ ├── Gerber_InnerLayer2.G2 │ ├── Gerber_MechanicalLayer.GME │ ├── Gerber_TopLayer.GTL │ ├── Gerber_TopPasteMaskLayer.GTP │ ├── Gerber_TopSilkscreenLayer.GTO │ └── Gerber_TopSolderMaskLayer.GTS │ ├── PCB_2022-10-22.pdf │ ├── README.txt │ ├── SMT │ ├── BOM_HD3S.PcbDoc_2022-10-22.csv │ └── PickAndPlace_HD3S.PcbDoc_2022-10-22.csv │ └── Schematic_NotKia 168x_2022-10-22.pdf ├── README.md ├── Resources ├── 2.0 S-5012-A(3).dwg ├── C2844071_32GBSDNANDMLC商业级_2022-07-05.PDF ├── C2874595_TYPE-C母座卧贴端子镀金8.94X7.3X3.16MM_2021-08-10 (1).PDF ├── C2924400_BCT8890ELA-TR_2021-11-26 (1).PDF ├── C496820_RGB三色共阳极624NM460NM_475NM515NM_535NM侧贴_2020-03-16.PDF ├── C506151_WD3153D-10_TR_2020-04-08 (3).PDF ├── HJ-68LR.pdf ├── HJ-68LR_en.pdf ├── README.md └── YAMAHA-YMU762.pdf └── Software ├── README.md ├── buildroot └── config ├── kernel ├── 5.19.patch └── notkia_defconfig ├── rootfs-overlay ├── .gnuboy │ └── gnuboy.rc ├── etc │ ├── fstab │ ├── init.d │ │ ├── S10notkiaHW │ │ ├── S11usbGadget │ │ └── S95mpd │ ├── inittab │ ├── libao.conf │ └── mpd.conf ├── usr │ ├── bin │ │ ├── fbgnuboy │ │ ├── lora │ │ ├── lvgl_demo │ │ └── lvgl_demo.real │ └── sbin │ │ ├── blanker │ │ ├── notkia-fbtft-bind.sh │ │ ├── notkia-fbtft-unbind.sh │ │ ├── notkia-hw.sh │ │ ├── notkia-usb-gadget.sh │ │ └── t9uinput └── var │ └── lib │ └── mpd │ └── music │ ├── Palmtree.opus │ └── Snowy.ogg └── sources ├── README.md ├── blanker.c ├── fonts.c ├── fonts.h ├── lora ├── CMakeLists.txt ├── common.h ├── main.c ├── main2.c ├── sx126x.c ├── sx126x.h ├── sx126x_hal.c ├── sx126x_hal.h └── sx126x_regs.h ├── lv_conf.h ├── lvgl_demo.c ├── st7789.c ├── st7789.h └── t9uinput ├── CMakeLists.txt └── main.cpp /Hardware/README.md: -------------------------------------------------------------------------------- 1 | # Hardware 2 | 3 | ## Contents 4 | **V2.0** - The V2.0 Notkia PCB 5 | 6 | **SoM_V1.3** - The X1000 SoM used on the V2.0 Notkia PCB 7 | 8 | ## Usage 9 | ### Producing 10 | The Gerber and SMT files can be used to produce the PCBs directly. 11 | 12 | ### Editing 13 | The standard version of EasyEDA was used to design this project. 14 | 15 | At editor, open the document via: Top Menu - File - Open - EasyEDA... , and select the json file, then open it at the editor, you can save it into a project. 16 | 17 | ## License 18 | CERN-OHL2-S 19 | 20 | -------------------------------------------------------------------------------- /Hardware/SoM_V1.3/Gerber/Drill_PTH_Through.DRL: -------------------------------------------------------------------------------- 1 | M48 2 | METRIC,LZ,000.000 3 | ;FILE_FORMAT=3:3 4 | ;TYPE=PLATED 5 | ;Layer: PTH_Through 6 | ;EasyEDA v6.5.21, 2022-10-22 16:28:30 7 | ;167bdced229c4b2ca01845534b4d4eab,294cf934c43b457281b0b0dcd80bbfec,10 8 | ;Gerber Generator version 0.2 9 | ;Holesize 1 = 0.600 mm 10 | T01C0.600 11 | % 12 | G05 13 | G90 14 | T01 15 | X-003210Y012199 16 | X-005110Y010999 17 | X-002210Y012199 18 | X-001210Y012199 19 | X-000210Y012199 20 | X002790Y012199 21 | X001790Y012199 22 | X000790Y012199 23 | X006790Y012199 24 | X007790Y012199 25 | X008790Y012199 26 | X005790Y012199 27 | X004790Y012199 28 | X003790Y012199 29 | X015790Y012198 30 | X016790Y012198 31 | X017790Y012198 32 | X020790Y012198 33 | X019790Y012198 34 | X018790Y012198 35 | X013790Y012199 36 | X014790Y012199 37 | X012790Y012199 38 | X011790Y012199 39 | X010790Y012199 40 | X009790Y012199 41 | X024790Y012198 42 | X023790Y012198 43 | X022790Y012198 44 | X021790Y012198 45 | X-005110Y009999 46 | X-005110Y008999 47 | X-005110Y007999 48 | X-005110Y006999 49 | X-005110Y005999 50 | X-005110Y-002000 51 | X-005110Y-003000 52 | X-005110Y-000000 53 | X-005110Y004000 54 | X-005110Y002999 55 | X-005110Y002000 56 | X-005110Y001000 57 | X-005110Y005000 58 | X-005110Y-001000 59 | X-005110Y-004001 60 | X-005110Y-005001 61 | X-005110Y-006001 62 | X-005110Y-007001 63 | X-003210Y-008201 64 | X021790Y-008202 65 | X022790Y-008202 66 | X023790Y-008202 67 | X024790Y-008202 68 | X009790Y-008201 69 | X010790Y-008202 70 | X011790Y-008202 71 | X014790Y-008202 72 | X013790Y-008202 73 | X012790Y-008202 74 | X018790Y-008202 75 | X020790Y-008201 76 | X019790Y-008201 77 | X017790Y-008202 78 | X016790Y-008202 79 | X015790Y-008202 80 | X003790Y-008201 81 | X004790Y-008201 82 | X005790Y-008201 83 | X008790Y-008201 84 | X007790Y-008201 85 | X006790Y-008201 86 | X000790Y-008201 87 | X001790Y-008201 88 | X002790Y-008201 89 | X-000210Y-008201 90 | X-001210Y-008201 91 | X-002210Y-008201 92 | X026690Y-007001 93 | X026690Y-006001 94 | X026690Y-005001 95 | X026690Y-004001 96 | X026690Y-003001 97 | X026690Y-002001 98 | X026690Y-001001 99 | X026690Y-000001 100 | X026690Y000999 101 | X026690Y001999 102 | X026690Y002999 103 | X026690Y003999 104 | X026690Y004999 105 | X026690Y005999 106 | X026690Y006999 107 | X026690Y007999 108 | X026690Y008999 109 | X026690Y009999 110 | X026690Y010999 111 | M30 112 | -------------------------------------------------------------------------------- /Hardware/SoM_V1.3/Gerber/Drill_PTH_Through_Via.DRL: -------------------------------------------------------------------------------- 1 | M48 2 | METRIC,LZ,000.000 3 | ;FILE_FORMAT=3:3 4 | ;TYPE=PLATED 5 | ;Layer: PTH_Through_Via 6 | ;EasyEDA v6.5.21, 2022-10-22 16:28:30 7 | ;167bdced229c4b2ca01845534b4d4eab,294cf934c43b457281b0b0dcd80bbfec,10 8 | ;Gerber Generator version 0.2 9 | ;Holesize 1 = 0.281 mm 10 | T01C0.281 11 | ;Holesize 2 = 0.301 mm 12 | T02C0.301 13 | ;Holesize 3 = 0.320 mm 14 | T03C0.320 15 | ;Holesize 4 = 0.351 mm 16 | T04C0.351 17 | % 18 | G05 19 | G90 20 | T01 21 | X014515Y-004701 22 | X013915Y-004701 23 | X013165Y-003651 24 | X013615Y-002851 25 | X013090Y-003101 26 | X014740Y-002676 27 | X014740Y-002126 28 | X013090Y-002526 29 | X011940Y-002576 30 | X012290Y-003051 31 | X010740Y-002626 32 | X010015Y-002226 33 | X017515Y-000426 34 | X016665Y-000426 35 | X017090Y-000026 36 | X018990Y005749 37 | X014315Y003974 38 | X014765Y004274 39 | X015215Y003974 40 | X014315Y003199 41 | X015215Y003224 42 | X015215Y002674 43 | X019215Y001199 44 | X018940Y000699 45 | X019215Y000199 46 | X018940Y-000301 47 | X018115Y-002776 48 | X017540Y-002776 49 | X020740Y009249 50 | X021290Y008849 51 | X021865Y009274 52 | X018565Y002474 53 | X005390Y-002976 54 | X005890Y-003926 55 | X008965Y-002926 56 | X008615Y-002476 57 | X008990Y-002026 58 | X008190Y-001201 59 | X005390Y-002401 60 | X-000902Y003799 61 | X008990Y-001201 62 | X009790Y-001201 63 | X008990Y-000401 64 | X009790Y-000401 65 | X008990Y000399 66 | X009790Y000399 67 | X009790Y001199 68 | X017490Y001574 69 | X019640Y-002101 70 | X011415Y007599 71 | X010640Y007599 72 | X012190Y007599 73 | X023515Y-000751 74 | X010190Y001724 75 | X010190Y002399 76 | X019215Y002899 77 | X018940Y003424 78 | X011540Y-007126 79 | X017140Y-006101 80 | X003840Y-002926 81 | X004140Y-002426 82 | X004715Y-002151 83 | X004190Y-001199 84 | X001440Y-002701 85 | X000840Y-002401 86 | X010315Y-007326 87 | X003390Y-000401 88 | X002590Y000399 89 | X003915Y000399 90 | X004765Y000824 91 | X001790Y001998 92 | X001790Y001198 93 | X002590Y001199 94 | X002590Y001998 95 | X000890Y002199 96 | X022965Y-001201 97 | X014765Y006449 98 | X013865Y006799 99 | X015290Y006799 100 | X015290Y007449 101 | X-004077Y011399 102 | X003950Y-006950 103 | X003748Y001524 104 | X003590Y006999 105 | X001790Y007599 106 | X000323Y008774 107 | X004290Y006974 108 | X000523Y008099 109 | X014290Y007999 110 | X015290Y007999 111 | X014315Y008799 112 | X015290Y008799 113 | X014490Y009549 114 | X015365Y009874 115 | X011815Y008099 116 | X012214Y010825 117 | X011389Y009999 118 | X003390Y009999 119 | X003540Y008974 120 | X004165Y008349 121 | X004965Y008349 122 | X005765Y008349 123 | X011390Y010824 124 | X009940Y007599 125 | X010590Y009999 126 | X010590Y009199 127 | X010990Y008799 128 | X009790Y009999 129 | X009790Y009199 130 | X004190Y009199 131 | X004990Y009199 132 | X007365Y009999 133 | X007390Y008949 134 | X008990Y009999 135 | X008190Y009999 136 | X008190Y009199 137 | X008990Y009199 138 | X000998Y007599 139 | T02 140 | X018690Y-005851 141 | X007390Y002799 142 | X007390Y001999 143 | X008190Y001999 144 | X008990Y001999 145 | X008190Y002799 146 | X007390Y001199 147 | X008190Y001199 148 | X008190Y006774 149 | X008990Y006774 150 | X009790Y006774 151 | X008190Y005974 152 | X008990Y005974 153 | X009790Y005974 154 | X008990Y005199 155 | X009790Y005199 156 | X008990Y002799 157 | X006865Y-003476 158 | X006865Y-002876 159 | X009790Y003599 160 | X010590Y003599 161 | X007790Y003999 162 | X006590Y005999 163 | X005790Y005999 164 | X006590Y006799 165 | X005790Y006799 166 | X006590Y005199 167 | X005790Y005199 168 | X004990Y005199 169 | X004990Y004399 170 | X005790Y004399 171 | X004990Y002799 172 | X005790Y003549 173 | X005715Y001274 174 | X005791Y002000 175 | X015268Y-003476 176 | X015741Y-002853 177 | X016211Y-003476 178 | X008965Y-005851 179 | X009665Y-005851 180 | X003340Y000399 181 | X004590Y001524 182 | X002590Y002774 183 | X004190Y010000 184 | X021765Y000174 185 | X022290Y-000276 186 | X020465Y001599 187 | X019190Y010449 188 | X020265Y010099 189 | X025948Y009999 190 | T03 191 | X016440Y005524 192 | X024915Y006874 193 | X-001025Y002100 194 | X003298Y004599 195 | X-004102Y004449 196 | X025215Y009974 197 | X024965Y-001501 198 | X016865Y001824 199 | X018340Y004749 200 | X017315Y005474 201 | X017515Y004724 202 | X017040Y002574 203 | X017415Y002149 204 | X018565Y001774 205 | X-003702Y-000551 206 | X-003402Y001124 207 | X-002377Y009249 208 | X-003100Y-003425 209 | X-002327Y007399 210 | X-000352Y010649 211 | X-001302Y010749 212 | X-003877Y009399 213 | X-000327Y008049 214 | X-001877Y-000476 215 | X-000452Y-001275 216 | X-001877Y-001400 217 | X-000902Y004374 218 | X-002777Y004374 219 | X-000327Y-002926 220 | X-003052Y009249 221 | X-000000Y-000000 222 | T04 223 | X015340Y-004051 224 | X015740Y-004451 225 | X016715Y-004551 226 | X017090Y-004226 227 | X018640Y-004451 228 | X019140Y-004076 229 | X014190Y-006426 230 | X002400Y-004750 231 | X016165Y008824 232 | X017790Y006874 233 | X013090Y-006451 234 | X020915Y-007051 235 | X015915Y-006426 236 | X009690Y-004001 237 | X-003700Y-003425 238 | X005340Y-003926 239 | X006415Y-004576 240 | X006865Y-004126 241 | X-000110Y-006876 242 | X-004127Y-001526 243 | X022290Y-007200 244 | X023290Y-007201 245 | X025652Y-004501 246 | X025652Y-005476 247 | X025652Y-006526 248 | X025652Y-003526 249 | X025652Y-002551 250 | X025652Y-001501 251 | X025652Y002499 252 | X025652Y003499 253 | X025652Y004449 254 | X023365Y006574 255 | X023715Y003524 256 | X025652Y001474 257 | X003250Y-004750 258 | X005415Y-004750 259 | X022390Y006574 260 | X024365Y-002551 261 | X025652Y000474 262 | X025652Y-000526 263 | X025652Y005399 264 | X016990Y006874 265 | X000948Y-004051 266 | M30 267 | -------------------------------------------------------------------------------- /Hardware/SoM_V1.3/Gerber/Gerber_BoardOutlineLayer.GKO: -------------------------------------------------------------------------------- 1 | G04 Layer: BoardOutlineLayer* 2 | G04 EasyEDA v6.5.21, 2022-10-22 16:28:30* 3 | G04 167bdced229c4b2ca01845534b4d4eab,294cf934c43b457281b0b0dcd80bbfec,10* 4 | G04 Gerber Generator version 0.2* 5 | G04 Scale: 100 percent, Rotated: No, Reflected: No * 6 | G04 Dimensions in millimeters * 7 | G04 leading zeros omitted , absolute positions ,4 integer and 5 decimal * 8 | %FSLAX45Y45*% 9 | %MOMM*% 10 | 11 | %ADD10C,0.2540*% 12 | D10* 13 | X-480882Y1219901D02* 14 | G01* 15 | X2668971Y1219901D01* 16 | X2668971Y-819972D01* 17 | X-511108Y-819972D01* 18 | X-511108Y-819972D01* 19 | X-511108Y1219901D01* 20 | X-480882Y1219901D01* 21 | 22 | %LPD*% 23 | M02* 24 | -------------------------------------------------------------------------------- /Hardware/SoM_V1.3/Gerber/Gerber_BottomPasteMaskLayer.GBP: -------------------------------------------------------------------------------- 1 | G04 Layer: BottomPasteMaskLayer* 2 | G04 EasyEDA v6.5.21, 2022-10-22 16:28:30* 3 | G04 167bdced229c4b2ca01845534b4d4eab,294cf934c43b457281b0b0dcd80bbfec,10* 4 | G04 Gerber Generator version 0.2* 5 | G04 Scale: 100 percent, Rotated: No, Reflected: No * 6 | G04 Dimensions in millimeters * 7 | G04 leading zeros omitted , absolute positions ,4 integer and 5 decimal * 8 | %FSLAX45Y45*% 9 | %MOMM*% 10 | 11 | %ADD10O,1.9999959999999999X1.9999959999999999*% 12 | %ADD11O,1.3299948000000001X1.3299948000000001*% 13 | %ADD12O,1.499997X1.499997*% 14 | 15 | %LPD*% 16 | D10* 17 | G01* 18 | X-1151011Y942431D03* 19 | D11* 20 | G01* 21 | X1279006Y-600059D03* 22 | G01* 23 | X1279006Y99938D03* 24 | G01* 25 | X1279006Y-100060D03* 26 | G01* 27 | X1079007Y-400060D03* 28 | G01* 29 | X1079007Y-600059D03* 30 | G01* 31 | X679008Y-100060D03* 32 | G01* 33 | X679008Y-600059D03* 34 | G01* 35 | X479008Y-600059D03* 36 | G01* 37 | X279008Y-600059D03* 38 | G01* 39 | X79009Y-600059D03* 40 | G01* 41 | X-121015Y-600059D03* 42 | G01* 43 | X2279004Y-600059D03* 44 | G01* 45 | X79009Y999937D03* 46 | G01* 47 | X279008Y999937D03* 48 | D12* 49 | G01* 50 | X-1146007Y602427D03* 51 | D11* 52 | G01* 53 | X79009Y599937D03* 54 | G01* 55 | X279008Y599937D03* 56 | G01* 57 | X279008Y799937D03* 58 | G01* 59 | X2079005Y799937D03* 60 | G01* 61 | X1879005Y799937D03* 62 | G01* 63 | X679008Y399938D03* 64 | G01* 65 | X679008Y999937D03* 66 | G01* 67 | X679008Y799937D03* 68 | G01* 69 | X879007Y799937D03* 70 | G01* 71 | X879007Y399938D03* 72 | G01* 73 | X2279004Y799937D03* 74 | G01* 75 | X2279004Y999937D03* 76 | G01* 77 | X2279004Y-400060D03* 78 | G01* 79 | X2279004Y99938D03* 80 | G01* 81 | X2279004Y399938D03* 82 | G01* 83 | X-119999Y99989D03* 84 | G01* 85 | X87340Y-100060D03* 86 | M02* 87 | -------------------------------------------------------------------------------- /Hardware/SoM_V1.3/Gerber/Gerber_BottomSilkscreenLayer.GBO: -------------------------------------------------------------------------------- 1 | G04 Layer: BottomSilkscreenLayer* 2 | G04 EasyEDA v6.5.21, 2022-10-22 16:28:30* 3 | G04 167bdced229c4b2ca01845534b4d4eab,294cf934c43b457281b0b0dcd80bbfec,10* 4 | G04 Gerber Generator version 0.2* 5 | G04 Scale: 100 percent, Rotated: No, Reflected: No * 6 | G04 Dimensions in millimeters * 7 | G04 leading zeros omitted , absolute positions ,4 integer and 5 decimal * 8 | %FSLAX45Y45*% 9 | %MOMM*% 10 | 11 | %ADD10C,0.0001*% 12 | 13 | %LPD*% 14 | G36* 15 | X484987Y1059992D02* 16 | G01* 17 | X484987Y940612D01* 18 | X588365Y1000302D01* 19 | G37* 20 | G36* 21 | X-308965Y160070D02* 22 | G01* 23 | X-308965Y40690D01* 24 | X-205587Y100380D01* 25 | G37* 26 | G36* 27 | X1684985Y859993D02* 28 | G01* 29 | X1684985Y740613D01* 30 | X1788363Y800303D01* 31 | G37* 32 | M02* 33 | -------------------------------------------------------------------------------- /Hardware/SoM_V1.3/Gerber/Gerber_BottomSolderMaskLayer.GBS: -------------------------------------------------------------------------------- 1 | G04 Layer: BottomSolderMaskLayer* 2 | G04 EasyEDA v6.5.21, 2022-10-22 16:28:30* 3 | G04 167bdced229c4b2ca01845534b4d4eab,294cf934c43b457281b0b0dcd80bbfec,10* 4 | G04 Gerber Generator version 0.2* 5 | G04 Scale: 100 percent, Rotated: No, Reflected: No * 6 | G04 Dimensions in millimeters * 7 | G04 leading zeros omitted , absolute positions ,4 integer and 5 decimal * 8 | %FSLAX45Y45*% 9 | %MOMM*% 10 | 11 | %AMMACRO1*1,1,$1,$2,$3*1,1,$1,$4,$5*1,1,$1,0-$2,0-$3*1,1,$1,0-$4,0-$5*20,1,$1,$2,$3,$4,$5,0*20,1,$1,$4,$5,0-$2,0-$3,0*20,1,$1,0-$2,0-$3,0-$4,0-$5,0*20,1,$1,0-$4,0-$5,$2,$3,0*4,1,4,$2,$3,$4,$5,0-$2,0-$3,0-$4,0-$5,$2,$3,0*% 12 | %ADD10O,2.101596X2.101596*% 13 | %ADD11O,1.4315948X1.4315948*% 14 | %ADD12O,1.6015970000000002X1.6015970000000002*% 15 | %ADD13MACRO1,0.1016X-0.3X0.6X0.3X0.6*% 16 | %ADD14MACRO1,0.1016X-0.6X-0.3X-0.6X0.3*% 17 | %ADD15MACRO1,0.1016X0.3X-0.6X-0.3X-0.6*% 18 | %ADD16C,0.0131*% 19 | 20 | %LPD*% 21 | G36* 22 | X2467610Y-45516D02* 23 | G01* 24 | X2461412Y-46075D01* 25 | X2455875Y-47701D01* 26 | X2450998Y-50241D01* 27 | X2446883Y-53644D01* 28 | X2443581Y-57708D01* 29 | X2441143Y-62331D01* 30 | X2439670Y-67462D01* 31 | X2439162Y-72948D01* 32 | X2442464Y-72948D01* 33 | X2442921Y-68224D01* 34 | X2444292Y-63754D01* 35 | X2446477Y-59690D01* 36 | X2449423Y-56184D01* 37 | X2453030Y-53238D01* 38 | X2457348Y-51003D01* 39 | X2462225Y-49580D01* 40 | X2467610Y-49072D01* 41 | X2472893Y-49580D01* 42 | X2477668Y-51003D01* 43 | X2481884Y-53238D01* 44 | X2485440Y-56184D01* 45 | X2488336Y-59690D01* 46 | X2490470Y-63754D01* 47 | X2491790Y-68224D01* 48 | X2492248Y-72948D01* 49 | X2491790Y-77622D01* 50 | X2490470Y-81991D01* 51 | X2488336Y-86004D01* 52 | X2485440Y-89560D01* 53 | X2481884Y-92456D01* 54 | X2477668Y-94691D01* 55 | X2472893Y-96113D01* 56 | X2467610Y-96570D01* 57 | X2462225Y-96113D01* 58 | X2457348Y-94691D01* 59 | X2453030Y-92456D01* 60 | X2449423Y-89509D01* 61 | X2446477Y-86004D01* 62 | X2444292Y-81991D01* 63 | X2442921Y-77622D01* 64 | X2442464Y-72948D01* 65 | X2439162Y-72948D01* 66 | X2439670Y-78384D01* 67 | X2441143Y-83413D01* 68 | X2443581Y-88036D01* 69 | X2446883Y-92100D01* 70 | X2450998Y-95402D01* 71 | X2455875Y-97942D01* 72 | X2461412Y-99568D01* 73 | X2467610Y-100126D01* 74 | X2473756Y-99568D01* 75 | X2479243Y-97942D01* 76 | X2484018Y-95402D01* 77 | X2488031Y-92100D01* 78 | X2491232Y-88036D01* 79 | X2493619Y-83413D01* 80 | X2495042Y-78384D01* 81 | X2495550Y-72948D01* 82 | X2495042Y-67462D01* 83 | X2493568Y-62331D01* 84 | X2491181Y-57708D01* 85 | X2487930Y-53644D01* 86 | X2483916Y-50241D01* 87 | X2479141Y-47701D01* 88 | X2473706Y-46075D01* 89 | G37* 90 | G36* 91 | X2455672Y-60756D02* 92 | G01* 93 | X2453741Y-63144D01* 94 | X2452217Y-65735D01* 95 | X2451201Y-68681D01* 96 | X2450846Y-72186D01* 97 | X2451963Y-78232D01* 98 | X2455214Y-83058D01* 99 | X2460498Y-86258D01* 100 | X2467610Y-87426D01* 101 | X2474264Y-86156D01* 102 | X2479294Y-82753D01* 103 | X2482494Y-77774D01* 104 | X2483612Y-71932D01* 105 | X2483256Y-68630D01* 106 | X2482240Y-65887D01* 107 | X2480716Y-63550D01* 108 | X2478786Y-61518D01* 109 | X2475738Y-64058D01* 110 | X2477262Y-65887D01* 111 | X2478379Y-67665D01* 112 | X2479040Y-69596D01* 113 | X2479294Y-71678D01* 114 | X2478430Y-76047D01* 115 | X2475992Y-79400D01* 116 | X2472334Y-81584D01* 117 | X2467610Y-82346D01* 118 | X2462428Y-81635D01* 119 | X2458516Y-79552D01* 120 | X2456027Y-76250D01* 121 | X2455164Y-71932D01* 122 | X2455418Y-69291D01* 123 | X2456180Y-67005D01* 124 | X2457399Y-64973D01* 125 | X2458974Y-63042D01* 126 | G37* 127 | G36* 128 | X2449271Y480517D02* 129 | G01* 130 | X2447340Y480212D01* 131 | X2445461Y479247D01* 132 | X2444343Y477520D01* 133 | X2443937Y475437D01* 134 | X2444343Y473354D01* 135 | X2445461Y471627D01* 136 | X2447340Y470662D01* 137 | X2449271Y470357D01* 138 | X2451252Y470662D01* 139 | X2453081Y471627D01* 140 | X2454249Y473354D01* 141 | X2454605Y475437D01* 142 | X2454249Y477520D01* 143 | X2453081Y479247D01* 144 | X2451252Y480212D01* 145 | G37* 146 | G36* 147 | X2476957Y453593D02* 148 | G01* 149 | X2471877Y452577D01* 150 | X2472486Y450443D01* 151 | X2472893Y445719D01* 152 | X2472842Y442671D01* 153 | X2472182Y438353D01* 154 | X2471623Y436067D01* 155 | X2444699Y436067D01* 156 | X2444699Y430479D01* 157 | X2475433Y430479D01* 158 | X2476550Y434035D01* 159 | X2477363Y437591D01* 160 | X2477820Y441147D01* 161 | X2477973Y445820D01* 162 | X2477566Y450088D01* 163 | G37* 164 | G36* 165 | X2459431Y419811D02* 166 | G01* 167 | X2459431Y413969D01* 168 | X2466035Y413816D01* 169 | X2467813Y413410D01* 170 | X2469337Y412699D01* 171 | X2471724Y410565D01* 172 | X2472537Y409194D01* 173 | X2472994Y407619D01* 174 | X2473096Y404876D01* 175 | X2472740Y403098D01* 176 | X2471978Y401523D01* 177 | X2470962Y400151D01* 178 | X2469692Y398881D01* 179 | X2468168Y397865D01* 180 | X2466543Y397205D01* 181 | X2464003Y396697D01* 182 | X2464003Y413969D01* 183 | X2459431Y413969D01* 184 | X2459431Y396443D01* 185 | X2457043Y396849D01* 186 | X2455011Y397510D01* 187 | X2453233Y398475D01* 188 | X2451811Y399745D01* 189 | X2450693Y401421D01* 190 | X2449931Y403352D01* 191 | X2449423Y405587D01* 192 | X2449423Y412292D01* 193 | X2449830Y414528D01* 194 | X2450795Y416763D01* 195 | X2445715Y417525D01* 196 | X2444140Y410819D01* 197 | X2443937Y407619D01* 198 | X2444242Y403606D01* 199 | X2445207Y400253D01* 200 | X2446731Y397256D01* 201 | X2448763Y394919D01* 202 | X2451252Y393141D01* 203 | X2454097Y391871D01* 204 | X2457348Y390906D01* 205 | X2460955Y390601D01* 206 | X2465019Y391007D01* 207 | X2466898Y391464D01* 208 | X2470048Y392836D01* 209 | X2472740Y394462D01* 210 | X2473909Y395427D01* 211 | X2475687Y397865D01* 212 | X2476957Y400507D01* 213 | X2477719Y403199D01* 214 | X2477973Y406095D01* 215 | X2477719Y409194D01* 216 | X2476957Y411937D01* 217 | X2475687Y414274D01* 218 | X2473909Y416255D01* 219 | X2471623Y417830D01* 220 | X2468778Y418947D01* 221 | X2465374Y419608D01* 222 | G37* 223 | G36* 224 | X2444699Y386283D02* 225 | G01* 226 | X2444699Y379425D01* 227 | X2446985Y377952D01* 228 | X2451506Y374243D01* 229 | X2456484Y368757D01* 230 | X2460447Y363677D01* 231 | X2444699Y363677D01* 232 | X2444699Y357835D01* 233 | X2492197Y357835D01* 234 | X2493213Y363677D01* 235 | X2463749Y363677D01* 236 | X2473706Y375005D01* 237 | X2477211Y378409D01* 238 | X2477211Y385013D01* 239 | X2473604Y381711D01* 240 | X2469845Y377901D01* 241 | X2462479Y369519D01* 242 | X2461056Y371602D01* 243 | X2459177Y373837D01* 244 | X2452014Y380898D01* 245 | X2447086Y384810D01* 246 | G37* 247 | G36* 248 | X2445207Y348183D02* 249 | G01* 250 | X2444445Y342849D01* 251 | X2443946Y335737D01* 252 | X2448763Y335737D01* 253 | X2449271Y342595D01* 254 | X2458923Y342595D01* 255 | X2459685Y339801D01* 256 | X2459634Y334772D01* 257 | X2459126Y331825D01* 258 | X2458059Y329539D01* 259 | X2457145Y328625D01* 260 | X2455976Y328066D01* 261 | X2454351Y327863D01* 262 | X2451760Y328371D01* 263 | X2450795Y329031D01* 264 | X2450033Y329895D01* 265 | X2449118Y332486D01* 266 | X2448763Y335737D01* 267 | X2443946Y335737D01* 268 | X2444445Y330657D01* 269 | X2445969Y326339D01* 270 | X2447442Y324510D01* 271 | X2449271Y323037D01* 272 | X2451557Y322275D01* 273 | X2454351Y322021D01* 274 | X2456942Y322326D01* 275 | X2459177Y323291D01* 276 | X2460853Y324561D01* 277 | X2462225Y326339D01* 278 | X2463292Y328422D01* 279 | X2464003Y330657D01* 280 | X2464409Y333197D01* 281 | X2464358Y339242D01* 282 | X2463749Y342595D01* 283 | X2466746Y342493D01* 284 | X2469489Y341731D01* 285 | X2470607Y341071D01* 286 | X2471674Y339953D01* 287 | X2472385Y338531D01* 288 | X2472944Y336804D01* 289 | X2473147Y334721D01* 290 | X2473045Y331876D01* 291 | X2471877Y326085D01* 292 | X2476703Y325323D01* 293 | X2477160Y326999D01* 294 | X2477871Y332130D01* 295 | X2477973Y335229D01* 296 | X2477719Y338531D01* 297 | X2476957Y341325D01* 298 | X2475992Y343611D01* 299 | X2474671Y345389D01* 300 | X2472791Y346659D01* 301 | X2468219Y347980D01* 302 | X2465527Y348183D01* 303 | G37* 304 | G36* 305 | X2444699Y315671D02* 306 | G01* 307 | X2444699Y310083D01* 308 | X2481021Y309321D01* 309 | X2461209Y302971D01* 310 | X2461209Y297891D01* 311 | X2481021Y291541D01* 312 | X2444699Y290779D01* 313 | X2444699Y285191D01* 314 | X2466797Y286207D01* 315 | X2488133Y288239D01* 316 | X2488133Y293573D01* 317 | X2466543Y300431D01* 318 | X2488133Y307289D01* 319 | X2488133Y312623D01* 320 | X2477820Y313791D01* 321 | X2467051Y314655D01* 322 | G37* 323 | G36* 324 | X2460955Y280111D02* 325 | G01* 326 | X2457348Y279857D01* 327 | X2454097Y279095D01* 328 | X2451150Y277723D01* 329 | X2448763Y276047D01* 330 | X2446731Y273812D01* 331 | X2445207Y271221D01* 332 | X2444242Y268376D01* 333 | X2443937Y265379D01* 334 | X2449271Y265379D01* 335 | X2449474Y267309D01* 336 | X2450033Y268986D01* 337 | X2450998Y270459D01* 338 | X2452319Y271729D01* 339 | X2454097Y272846D01* 340 | X2456129Y273659D01* 341 | X2458415Y274116D01* 342 | X2460955Y274269D01* 343 | X2463596Y274116D01* 344 | X2465933Y273659D01* 345 | X2467914Y272846D01* 346 | X2471064Y270459D01* 347 | X2472080Y268986D01* 348 | X2472690Y267309D01* 349 | X2472893Y265379D01* 350 | X2472690Y263448D01* 351 | X2472080Y261772D01* 352 | X2471064Y260299D01* 353 | X2469591Y259029D01* 354 | X2467914Y258013D01* 355 | X2465933Y257302D01* 356 | X2463596Y256895D01* 357 | X2460955Y256743D01* 358 | X2458415Y256895D01* 359 | X2456129Y257302D01* 360 | X2454097Y258013D01* 361 | X2452319Y259029D01* 362 | X2450998Y260299D01* 363 | X2450033Y261772D01* 364 | X2449474Y263448D01* 365 | X2449271Y265379D01* 366 | X2443937Y265379D01* 367 | X2444242Y262280D01* 368 | X2445207Y259537D01* 369 | X2446731Y256946D01* 370 | X2448763Y254711D01* 371 | X2451150Y253085D01* 372 | X2454097Y251663D01* 373 | X2457348Y250901D01* 374 | X2460955Y250647D01* 375 | X2464663Y250901D01* 376 | X2468067Y251663D01* 377 | X2470912Y253085D01* 378 | X2473401Y254711D01* 379 | X2475230Y256946D01* 380 | X2476703Y259537D01* 381 | X2477668Y262280D01* 382 | X2477973Y265379D01* 383 | X2477668Y268376D01* 384 | X2476703Y271221D01* 385 | X2475280Y273812D01* 386 | X2473401Y276047D01* 387 | X2470912Y277723D01* 388 | X2468067Y279095D01* 389 | X2464663Y279857D01* 390 | G37* 391 | G36* 392 | X2445715Y243027D02* 393 | G01* 394 | X2444445Y238201D01* 395 | X2443937Y231343D01* 396 | X2449271Y231343D01* 397 | X2449423Y235610D01* 398 | X2449779Y237185D01* 399 | X2470353Y237185D01* 400 | X2471318Y235915D01* 401 | X2472740Y232308D01* 402 | X2472893Y230327D01* 403 | X2472639Y228193D01* 404 | X2471877Y226263D01* 405 | X2470912Y224891D01* 406 | X2469591Y223723D01* 407 | X2465781Y222199D01* 408 | X2460955Y221691D01* 409 | X2458313Y221843D01* 410 | X2456027Y222351D01* 411 | X2453995Y223113D01* 412 | X2452319Y224231D01* 413 | X2450998Y225755D01* 414 | X2450033Y227431D01* 415 | X2449474Y229311D01* 416 | X2449271Y231343D01* 417 | X2443937Y231343D01* 418 | X2444242Y227990D01* 419 | X2445207Y224993D01* 420 | X2446528Y222199D01* 421 | X2448509Y219913D01* 422 | X2450998Y218135D01* 423 | X2453843Y216865D01* 424 | X2457297Y215900D01* 425 | X2460955Y215595D01* 426 | X2464562Y215849D01* 427 | X2467813Y216611D01* 428 | X2470658Y217830D01* 429 | X2473147Y219405D01* 430 | X2475179Y221386D01* 431 | X2476703Y223723D01* 432 | X2477668Y226466D01* 433 | X2477973Y229565D01* 434 | X2477871Y232003D01* 435 | X2477465Y234137D01* 436 | X2475941Y237185D01* 437 | X2492197Y237185D01* 438 | X2493213Y243027D01* 439 | G37* 440 | G36* 441 | X2445715Y207975D02* 442 | G01* 443 | X2444140Y199542D01* 444 | X2443937Y195529D01* 445 | X2444242Y192227D01* 446 | X2445207Y189433D01* 447 | X2446477Y187147D01* 448 | X2448255Y185369D01* 449 | X2450439Y184099D01* 450 | X2452827Y183337D01* 451 | X2455773Y182778D01* 452 | X2458923Y182575D01* 453 | X2477211Y182575D01* 454 | X2477211Y188417D01* 455 | X2457399Y188518D01* 456 | X2455011Y188874D01* 457 | X2453081Y189433D01* 458 | X2451557Y190195D01* 459 | X2450592Y191262D01* 460 | X2449880Y192633D01* 461 | X2449423Y194310D01* 462 | X2449271Y199847D01* 463 | X2449779Y202133D01* 464 | X2477211Y202133D01* 465 | X2477211Y207975D01* 466 | G37* 467 | G36* 468 | X2455621Y173939D02* 469 | G01* 470 | X2452979Y173685D01* 471 | X2450693Y172974D01* 472 | X2448661Y171805D01* 473 | X2446985Y170129D01* 474 | X2445664Y168046D01* 475 | X2444699Y165506D01* 476 | X2444140Y162560D01* 477 | X2444089Y155905D01* 478 | X2444750Y152146D01* 479 | X2446731Y146761D01* 480 | X2451557Y148539D01* 481 | X2449779Y152603D01* 482 | X2449017Y155651D01* 483 | X2448763Y159207D01* 484 | X2448864Y161340D01* 485 | X2449220Y163220D01* 486 | X2449779Y164795D01* 487 | X2450541Y166065D01* 488 | X2451455Y167081D01* 489 | X2452573Y167792D01* 490 | X2453995Y168198D01* 491 | X2456586Y168300D01* 492 | X2458262Y167944D01* 493 | X2459685Y167081D01* 494 | X2460955Y165912D01* 495 | X2463495Y162001D01* 496 | X2467356Y153517D01* 497 | X2470048Y150368D01* 498 | X2471674Y149250D01* 499 | X2474620Y148031D01* 500 | X2476957Y147777D01* 501 | X2479700Y148031D01* 502 | X2482088Y148691D01* 503 | X2484170Y149809D01* 504 | X2485847Y151333D01* 505 | X2487320Y153314D01* 506 | X2488336Y155600D01* 507 | X2488946Y158242D01* 508 | X2489149Y162153D01* 509 | X2488742Y165658D01* 510 | X2487117Y171145D01* 511 | X2486355Y172415D01* 512 | X2481529Y170637D01* 513 | X2483307Y166827D01* 514 | X2483916Y164185D01* 515 | X2484069Y161239D01* 516 | X2483713Y158394D01* 517 | X2482545Y155905D01* 518 | X2481681Y154889D01* 519 | X2480614Y154178D01* 520 | X2479294Y153771D01* 521 | X2476855Y153670D01* 522 | X2474671Y154127D01* 523 | X2472944Y155397D01* 524 | X2471267Y157937D01* 525 | X2467610Y165760D01* 526 | X2466390Y167944D01* 527 | X2465019Y169824D01* 528 | X2462631Y172161D01* 529 | X2460701Y173177D01* 530 | X2458415Y173736D01* 531 | G37* 532 | G36* 533 | X2444699Y104089D02* 534 | G01* 535 | X2444699Y77927D01* 536 | X2446223Y77673D01* 537 | X2449118Y77927D01* 538 | X2451557Y78689D01* 539 | X2456383Y81229D01* 540 | X2460701Y84785D01* 541 | X2468321Y92151D01* 542 | X2471267Y94538D01* 543 | X2474417Y96062D01* 544 | X2475941Y96418D01* 545 | X2477668Y96418D01* 546 | X2479344Y96062D01* 547 | X2481783Y94691D01* 548 | X2483307Y92506D01* 549 | X2483764Y90576D01* 550 | X2483662Y86512D01* 551 | X2483307Y85039D01* 552 | X2481529Y81889D01* 553 | X2479751Y79705D01* 554 | X2483815Y76911D01* 555 | X2485339Y78689D01* 556 | X2487117Y81229D01* 557 | X2488946Y86868D01* 558 | X2489149Y89103D01* 559 | X2488946Y92202D01* 560 | X2488336Y94894D01* 561 | X2487320Y97180D01* 562 | X2485847Y99009D01* 563 | X2484170Y100482D01* 564 | X2482088Y101498D01* 565 | X2479700Y102108D01* 566 | X2475839Y102260D01* 567 | X2473706Y101904D01* 568 | X2471623Y101041D01* 569 | X2465527Y96824D01* 570 | X2454351Y86461D01* 571 | X2450795Y84277D01* 572 | X2449525Y84023D01* 573 | X2449525Y104089D01* 574 | G37* 575 | G36* 576 | X2444699Y69037D02* 577 | G01* 578 | X2444699Y42875D01* 579 | X2446223Y42621D01* 580 | X2449118Y42875D01* 581 | X2451557Y43637D01* 582 | X2456383Y46177D01* 583 | X2460701Y49733D01* 584 | X2469845Y58521D01* 585 | X2471267Y59639D01* 586 | X2474417Y61010D01* 587 | X2475941Y61366D01* 588 | X2477668Y61417D01* 589 | X2479344Y61163D01* 590 | X2481224Y60096D01* 591 | X2482291Y59131D01* 592 | X2483561Y56845D01* 593 | X2483815Y54813D01* 594 | X2483561Y50749D01* 595 | X2483002Y49276D01* 596 | X2481173Y46431D01* 597 | X2479751Y44653D01* 598 | X2483815Y41859D01* 599 | X2485339Y43637D01* 600 | X2487117Y46177D01* 601 | X2488946Y51816D01* 602 | X2489149Y54051D01* 603 | X2488946Y57251D01* 604 | X2488336Y59943D01* 605 | X2487320Y62179D01* 606 | X2485847Y63957D01* 607 | X2484170Y65430D01* 608 | X2482088Y66446D01* 609 | X2479700Y67056D01* 610 | X2475839Y67208D01* 611 | X2473706Y66852D01* 612 | X2471623Y65989D01* 613 | X2468575Y64211D01* 614 | X2462580Y59080D01* 615 | X2456637Y53340D01* 616 | X2454351Y51409D01* 617 | X2452065Y49987D01* 618 | X2450795Y49428D01* 619 | X2449525Y49225D01* 620 | X2449525Y69037D01* 621 | G37* 622 | G36* 623 | X2466543Y34747D02* 624 | G01* 625 | X2461412Y34493D01* 626 | X2456891Y33782D01* 627 | X2453030Y32613D01* 628 | X2449779Y30937D01* 629 | X2447239Y28956D01* 630 | X2445410Y26568D01* 631 | X2444292Y23774D01* 632 | X2443937Y20523D01* 633 | X2449017Y20523D01* 634 | X2449322Y22606D01* 635 | X2450287Y24333D01* 636 | X2452014Y25857D01* 637 | X2454097Y26873D01* 638 | X2456637Y27787D01* 639 | X2463038Y28803D01* 640 | X2468321Y28905D01* 641 | X2471623Y28651D01* 642 | X2474722Y28143D01* 643 | X2477516Y27381D01* 644 | X2479852Y26416D01* 645 | X2481732Y25146D01* 646 | X2483104Y23520D01* 647 | X2483764Y21640D01* 648 | X2483764Y19304D01* 649 | X2483104Y17272D01* 650 | X2481732Y15646D01* 651 | X2479852Y14376D01* 652 | X2477516Y13462D01* 653 | X2474722Y12700D01* 654 | X2471623Y12192D01* 655 | X2468321Y11938D01* 656 | X2464816Y11938D01* 657 | X2461361Y12192D01* 658 | X2458110Y12700D01* 659 | X2455316Y13462D01* 660 | X2453030Y14376D01* 661 | X2451100Y15646D01* 662 | X2449728Y17272D01* 663 | X2449118Y19304D01* 664 | X2449017Y20523D01* 665 | X2443937Y20523D01* 666 | X2444292Y17272D01* 667 | X2445410Y14427D01* 668 | X2447239Y11938D01* 669 | X2449779Y9855D01* 670 | X2453030Y8178D01* 671 | X2456891Y7010D01* 672 | X2461412Y6299D01* 673 | X2466543Y6045D01* 674 | X2471674Y6299D01* 675 | X2476195Y7010D01* 676 | X2480056Y8178D01* 677 | X2483307Y9855D01* 678 | X2485898Y11938D01* 679 | X2487676Y14427D01* 680 | X2488793Y17272D01* 681 | X2489149Y20523D01* 682 | X2488793Y23774D01* 683 | X2487676Y26568D01* 684 | X2485898Y28956D01* 685 | X2483307Y30937D01* 686 | X2480056Y32613D01* 687 | X2476195Y33782D01* 688 | X2471674Y34493D01* 689 | G37* 690 | G36* 691 | X2467305Y24587D02* 692 | G01* 693 | X2465476Y24282D01* 694 | X2464003Y23317D01* 695 | X2463038Y22098D01* 696 | X2462733Y20523D01* 697 | X2463038Y18897D01* 698 | X2464003Y17475D01* 699 | X2465476Y16713D01* 700 | X2467305Y16459D01* 701 | X2468981Y16713D01* 702 | X2470353Y17475D01* 703 | X2471521Y18897D01* 704 | X2471877Y20523D01* 705 | X2471521Y22098D01* 706 | X2469692Y23876D01* 707 | X2468168Y24536D01* 708 | G37* 709 | G36* 710 | X2444699Y-1066D02* 711 | G01* 712 | X2444699Y-27228D01* 713 | X2447696Y-27178D01* 714 | X2450388Y-26670D01* 715 | X2455214Y-24384D01* 716 | X2459685Y-21234D01* 717 | X2468321Y-12750D01* 718 | X2471267Y-10464D01* 719 | X2474417Y-8940D01* 720 | X2475941Y-8686D01* 721 | X2478582Y-8788D01* 722 | X2480005Y-9194D01* 723 | X2481224Y-9804D01* 724 | X2482291Y-10718D01* 725 | X2483561Y-13004D01* 726 | X2483815Y-15290D01* 727 | X2483561Y-19354D01* 728 | X2482291Y-21894D01* 729 | X2479751Y-25196D01* 730 | X2483815Y-27990D01* 731 | X2484983Y-26924D01* 732 | X2486710Y-24434D01* 733 | X2488742Y-19202D01* 734 | X2489098Y-17170D01* 735 | X2488946Y-12852D01* 736 | X2488336Y-10058D01* 737 | X2487320Y-7772D01* 738 | X2485847Y-5892D01* 739 | X2484170Y-4419D01* 740 | X2482088Y-3403D01* 741 | X2479700Y-2794D01* 742 | X2475839Y-2641D01* 743 | X2473706Y-3149D01* 744 | X2471623Y-4013D01* 745 | X2469591Y-5181D01* 746 | X2464511Y-9194D01* 747 | X2455113Y-18084D01* 748 | X2451455Y-20421D01* 749 | X2449525Y-20878D01* 750 | X2449525Y-1066D01* 751 | G37* 752 | D10* 753 | G01* 754 | X-1151011Y942431D03* 755 | D11* 756 | G01* 757 | X1279006Y-600059D03* 758 | G01* 759 | X1279006Y99938D03* 760 | G01* 761 | X1279006Y-100060D03* 762 | G01* 763 | X1079007Y-400060D03* 764 | G01* 765 | X1079007Y-600059D03* 766 | G01* 767 | X679008Y-100060D03* 768 | G01* 769 | X679008Y-600059D03* 770 | G01* 771 | X479008Y-600059D03* 772 | G01* 773 | X279008Y-600059D03* 774 | G01* 775 | X79009Y-600059D03* 776 | G01* 777 | X-121015Y-600059D03* 778 | G01* 779 | X2279004Y-600059D03* 780 | G01* 781 | X79009Y999937D03* 782 | G01* 783 | X279008Y999937D03* 784 | D12* 785 | G01* 786 | X-1146007Y602427D03* 787 | D11* 788 | G01* 789 | X79009Y599937D03* 790 | G01* 791 | X279008Y599937D03* 792 | G01* 793 | X279008Y799937D03* 794 | G01* 795 | X2079005Y799937D03* 796 | G01* 797 | X1879005Y799937D03* 798 | G01* 799 | X679008Y399938D03* 800 | G01* 801 | X679008Y999937D03* 802 | G01* 803 | X679008Y799937D03* 804 | G01* 805 | X879007Y799937D03* 806 | G01* 807 | X879007Y399938D03* 808 | G01* 809 | X2279004Y799937D03* 810 | G01* 811 | X2279004Y999937D03* 812 | G01* 813 | X2279004Y-400060D03* 814 | G01* 815 | X2279004Y99938D03* 816 | G01* 817 | X2279004Y399938D03* 818 | G01* 819 | X-119999Y99989D03* 820 | G01* 821 | X87340Y-100060D03* 822 | D13* 823 | G01* 824 | X-321005Y1219926D03* 825 | D14* 826 | G01* 827 | X-511004Y1099926D03* 828 | D13* 829 | G01* 830 | X-221005Y1219921D03* 831 | G01* 832 | X-121005Y1219916D03* 833 | G01* 834 | X-21005Y1219911D03* 835 | G01* 836 | X278993Y1219895D03* 837 | G01* 838 | X178993Y1219901D03* 839 | G01* 840 | X78993Y1219906D03* 841 | G01* 842 | X678992Y1219875D03* 843 | G01* 844 | X778992Y1219870D03* 845 | G01* 846 | X878992Y1219865D03* 847 | G01* 848 | X578992Y1219880D03* 849 | G01* 850 | X478983Y1219875D03* 851 | G01* 852 | X378993Y1219890D03* 853 | G01* 854 | X1578990Y1219829D03* 855 | G01* 856 | X1678990Y1219824D03* 857 | G01* 858 | X1778990Y1219819D03* 859 | G01* 860 | X2078989Y1219804D03* 861 | G01* 862 | X1978990Y1219809D03* 863 | G01* 864 | X1878990Y1219814D03* 865 | G01* 866 | X1379004Y1219931D03* 867 | G01* 868 | X1479006Y1219926D03* 869 | G01* 870 | X1279004Y1219946D03* 871 | G01* 872 | X1178991Y1219850D03* 873 | G01* 874 | X1078992Y1219855D03* 875 | G01* 876 | X978992Y1219860D03* 877 | G01* 878 | X2478989Y1219784D03* 879 | G01* 880 | X2378989Y1219789D03* 881 | G01* 882 | X2278989Y1219794D03* 883 | G01* 884 | X2178989Y1219799D03* 885 | D14* 886 | G01* 887 | X-511004Y999947D03* 888 | G01* 889 | X-511004Y899942D03* 890 | G01* 891 | X-511004Y799937D03* 892 | G01* 893 | X-511004Y699932D03* 894 | G01* 895 | X-511004Y599927D03* 896 | G01* 897 | X-510994Y-200032D03* 898 | G01* 899 | X-510994Y-300037D03* 900 | G01* 901 | X-510994Y-43D03* 902 | G01* 903 | X-510994Y399950D03* 904 | G01* 905 | X-510994Y299946D03* 906 | G01* 907 | X-510994Y199971D03* 908 | G01* 909 | X-510994Y99966D03* 910 | G01* 911 | X-510994Y499958D03* 912 | G01* 913 | X-511002Y-100042D03* 914 | G01* 915 | X-511004Y-400121D03* 916 | G01* 917 | X-511004Y-500125D03* 918 | G01* 919 | X-511004Y-600130D03* 920 | G01* 921 | X-511004Y-700135D03* 922 | D15* 923 | G01* 924 | X-321005Y-820079D03* 925 | D13* 926 | G01* 927 | X2178989Y-820206D03* 928 | G01* 929 | X2278989Y-820211D03* 930 | G01* 931 | X2378989Y-820216D03* 932 | G01* 933 | X2478989Y-820221D03* 934 | G01* 935 | X978992Y-820145D03* 936 | G01* 937 | X1078992Y-820150D03* 938 | G01* 939 | X1178991Y-820155D03* 940 | G01* 941 | X1478991Y-820171D03* 942 | G01* 943 | X1378991Y-820165D03* 944 | G01* 945 | X1278991Y-820160D03* 946 | G01* 947 | X1878990Y-820191D03* 948 | G01* 949 | X2079012Y-820061D03* 950 | G01* 951 | X1979013Y-820066D03* 952 | G01* 953 | X1778990Y-820186D03* 954 | G01* 955 | X1678990Y-820181D03* 956 | G01* 957 | X1578990Y-820176D03* 958 | G01* 959 | X378993Y-820115D03* 960 | G01* 961 | X478993Y-820120D03* 962 | G01* 963 | X578992Y-820125D03* 964 | G01* 965 | X878992Y-820140D03* 966 | G01* 967 | X778992Y-820135D03* 968 | G01* 969 | X678992Y-820130D03* 970 | G01* 971 | X78993Y-820099D03* 972 | G01* 973 | X178993Y-820105D03* 974 | G01* 975 | X278993Y-820110D03* 976 | G01* 977 | X-21005Y-820094D03* 978 | G01* 979 | X-121005Y-820089D03* 980 | G01* 981 | X-221005Y-820084D03* 982 | D14* 983 | G01* 984 | X2668998Y-700140D03* 985 | G01* 986 | X2668998Y-600135D03* 987 | G01* 988 | X2668998Y-500131D03* 989 | G01* 990 | X2668998Y-400126D03* 991 | G01* 992 | X2668998Y-300121D03* 993 | G01* 994 | X2668998Y-200116D03* 995 | G01* 996 | X2668998Y-100111D03* 997 | G01* 998 | X2668998Y-106D03* 999 | G01* 1000 | X2668998Y99898D03* 1001 | G01* 1002 | X2668998Y199903D03* 1003 | G01* 1004 | X2668998Y299907D03* 1005 | G01* 1006 | X2668998Y399912D03* 1007 | G01* 1008 | X2668998Y499917D03* 1009 | G01* 1010 | X2668998Y599922D03* 1011 | G01* 1012 | X2668998Y699927D03* 1013 | G01* 1014 | X2668998Y799932D03* 1015 | G01* 1016 | X2668998Y899937D03* 1017 | G01* 1018 | X2668998Y999942D03* 1019 | G01* 1020 | X2668998Y1099947D03* 1021 | M02* 1022 | -------------------------------------------------------------------------------- /Hardware/SoM_V1.3/Gerber/PCB下单必读.txt: -------------------------------------------------------------------------------- 1 | 如何进行PCB下单 2 | 3 | 请查看: 4 | https://docs.lceda.cn/cn/PCB/Order-PCB -------------------------------------------------------------------------------- /Hardware/SoM_V1.3/PCB_PCB_undefined_2022-10-22.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SudoMaker/Notkia/1771f270f00f99e85bcb6e1ae1ada391b81fb2f3/Hardware/SoM_V1.3/PCB_PCB_undefined_2022-10-22.pdf -------------------------------------------------------------------------------- /Hardware/SoM_V1.3/README.txt: -------------------------------------------------------------------------------- 1 | 2 | How to use: 3 | 4 | At editor, open the document via: Top menu - File - Open - EasyEDA... , and select the json file, then open it at the editor, you can save it into a project. 5 | 6 | 7 | 如何使用: 8 | 9 | 打开编辑器,通过:顶部菜单 - 文件 - 打开 - 立创EDA... ,选择 json 文件打开在编辑器,你可以保存文档进工程里面。 -------------------------------------------------------------------------------- /Hardware/SoM_V1.3/SMT/BOM_PCB_undefined_2022-10-22.csv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SudoMaker/Notkia/1771f270f00f99e85bcb6e1ae1ada391b81fb2f3/Hardware/SoM_V1.3/SMT/BOM_PCB_undefined_2022-10-22.csv -------------------------------------------------------------------------------- /Hardware/SoM_V1.3/SMT/PickAndPlace_PCB_undefined_2022-10-22.csv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SudoMaker/Notkia/1771f270f00f99e85bcb6e1ae1ada391b81fb2f3/Hardware/SoM_V1.3/SMT/PickAndPlace_PCB_undefined_2022-10-22.csv -------------------------------------------------------------------------------- /Hardware/SoM_V1.3/Schematic_Nano_X1000_2022-10-22.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SudoMaker/Notkia/1771f270f00f99e85bcb6e1ae1ada391b81fb2f3/Hardware/SoM_V1.3/Schematic_Nano_X1000_2022-10-22.pdf -------------------------------------------------------------------------------- /Hardware/V2.0/Gerber/Drill_NPTH_Through.DRL: -------------------------------------------------------------------------------- 1 | M48 2 | METRIC,LZ,000.000 3 | ;FILE_FORMAT=3:3 4 | ;TYPE=NON_PLATED 5 | ;Layer: NPTH_Through 6 | ;EasyEDA v6.5.21, 2022-10-22 15:56:40 7 | ;9ab0f769691e454ba0e7696980ab9178,294cf934c43b457281b0b0dcd80bbfec,10 8 | ;Gerber Generator version 0.2 9 | ;Holesize 1 = 0.600 mm 10 | T01C0.600 11 | ;Holesize 2 = 2.250 mm 12 | T02C2.250 13 | % 14 | G05 15 | G90 16 | T01 17 | X-026580Y051485 18 | X-026580Y057265 19 | T02 20 | X-016293Y010554 21 | M30 22 | -------------------------------------------------------------------------------- /Hardware/V2.0/Gerber/Drill_PTH_Through.DRL: -------------------------------------------------------------------------------- 1 | M48 2 | METRIC,LZ,000.000 3 | ;FILE_FORMAT=3:3 4 | ;TYPE=PLATED 5 | ;Layer: PTH_Through 6 | ;EasyEDA v6.5.21, 2022-10-22 15:56:40 7 | ;9ab0f769691e454ba0e7696980ab9178,294cf934c43b457281b0b0dcd80bbfec,10 8 | ;Gerber Generator version 0.2 9 | ;Holesize 1 = 1.524 mm 10 | T01C1.524 11 | ;Holesize 2 = 2.000 mm 12 | T02C2.000 13 | % 14 | G05 15 | G90 16 | T01 17 | X008189Y053985G85X008194Y053985 18 | X-030749Y062977G85X-030744Y062977 19 | X-029784Y-013528G85X-029779Y-013528 20 | X007884Y-013528G85X007890Y-013528 21 | T02 22 | X-000875Y-028275 23 | M30 24 | -------------------------------------------------------------------------------- /Hardware/V2.0/Gerber/Drill_PTH_Through_Via.DRL: -------------------------------------------------------------------------------- 1 | M48 2 | METRIC,LZ,000.000 3 | ;FILE_FORMAT=3:3 4 | ;TYPE=PLATED 5 | ;Layer: PTH_Through_Via 6 | ;EasyEDA v6.5.21, 2022-10-22 15:56:40 7 | ;9ab0f769691e454ba0e7696980ab9178,294cf934c43b457281b0b0dcd80bbfec,10 8 | ;Gerber Generator version 0.2 9 | ;Holesize 1 = 0.301 mm 10 | T01C0.301 11 | ;Holesize 2 = 0.305 mm 12 | T02C0.305 13 | ;Holesize 3 = 0.380 mm 14 | T03C0.380 15 | ;Holesize 4 = 0.390 mm 16 | T04C0.390 17 | % 18 | G05 19 | G90 20 | T01 21 | X-008400Y002425 22 | X-007750Y003000 23 | X-008425Y003575 24 | X-006925Y012575 25 | X-008400Y012575 26 | X-009925Y012575 27 | X000775Y-003050 28 | X005425Y006650 29 | X004875Y006075 30 | X005425Y005550 31 | X004350Y004900 32 | X004350Y004200 33 | X004350Y003500 34 | X004400Y002725 35 | X004400Y001975 36 | X000324Y002924 37 | X-001550Y004575 38 | X-002625Y004200 39 | X-002625Y003550 40 | X-002325Y002700 41 | X-001375Y000100 42 | X-001825Y000725 43 | X-002750Y000725 44 | X-002275Y000100 45 | X001075Y005350 46 | X002050Y004975 47 | X-000825Y005725 48 | X-004125Y-002275 49 | X-003950Y000100 50 | X-003225Y000100 51 | X001800Y-008950 52 | X002700Y-008875 53 | X003175Y-008375 54 | X-002200Y-003650 55 | X004092Y-007000 56 | X-006800Y-002550 57 | X-008950Y-003800 58 | X-016150Y-000200 59 | X-026548Y-006081 60 | X-026375Y-008600 61 | X-022125Y-003150 62 | X-021550Y-003450 63 | X-023075Y-003150 64 | X-023700Y-003450 65 | X-026900Y-003200 66 | X-028050Y-002550 67 | X-019362Y-006372 68 | X-014075Y002650 69 | X-014900Y003375 70 | X-011950Y000550 71 | X-010925Y000550 72 | X-009950Y000550 73 | X-019600Y-002300 74 | X-018550Y-002300 75 | X-014450Y-002100 76 | X-009050Y000550 77 | X-023975Y002825 78 | X-023125Y002825 79 | X-022350Y002825 80 | X-021475Y002825 81 | X-021175Y001850 82 | X-021175Y001075 83 | X-028400Y006175 84 | X006550Y007975 85 | X-006350Y-007150 86 | X-008175Y-008950 87 | X-004850Y-000350 88 | X-003325Y-001375 89 | X-002975Y-001975 90 | X-019400Y-009900 91 | X-020400Y-009375 92 | X-019600Y-009150 93 | X-019300Y-008425 94 | X-019300Y-007623 95 | X-018325Y-009300 96 | X-016250Y-003500 97 | X-015265Y-005065 98 | X-028475Y-024025 99 | X-027575Y-016775 100 | X-005200Y-009800 101 | X-003750Y-017975 102 | X-005525Y-006875 103 | X-020575Y-015725 104 | X-021250Y-014925 105 | X-020575Y-014175 106 | X-005775Y-001200 107 | X-018925Y-013700 108 | X-027700Y009150 109 | X-028250Y008650 110 | X-027675Y008150 111 | X-028250Y007625 112 | X-027700Y006975 113 | X-027000Y-015750 114 | X-029250Y-015750 115 | X-023350Y004850 116 | X-022700Y005425 117 | X-000000Y000000 118 | X-002300Y005800 119 | X-020225Y004950 120 | X-020175Y004075 121 | X-017400Y008100 122 | X-014975Y-002600 123 | X-015525Y-003100 124 | X-015575Y007950 125 | X-003500Y006800 126 | X-008975Y001325 127 | X-015250Y006300 128 | X-014850Y006925 129 | X-024900Y003900 130 | X-028100Y-001075 131 | X-005850Y-000500 132 | X003475Y008900 133 | X004275Y009725 134 | X-014325Y009150 135 | X-004425Y009775 136 | X-004425Y008925 137 | X003075Y012750 138 | X-007975Y035925 139 | X-009100Y035425 140 | X-007950Y034925 141 | X-009100Y034425 142 | X-007950Y033925 143 | X-009075Y033450 144 | X-016025Y038550 145 | X-016525Y037075 146 | X-017525Y037075 147 | X-017025Y035775 148 | X-018025Y035775 149 | X-018525Y037075 150 | X-021125Y036025 151 | X-020375Y035525 152 | X-021125Y035025 153 | X-021075Y034025 154 | X-021025Y033025 155 | X-020400Y032525 156 | X-020400Y033525 157 | X-020375Y034525 158 | X-009175Y030650 159 | X-008300Y029900 160 | X-009175Y029200 161 | X-008275Y028525 162 | X003000Y039725 163 | X003600Y038375 164 | X004375Y039725 165 | X005100Y038375 166 | X005850Y039725 167 | X-007000Y025800 168 | X-007475Y024725 169 | X-008450Y024725 170 | X-007950Y025800 171 | X-016550Y032075 172 | X-017525Y032075 173 | X-018450Y032075 174 | X008600Y030725 175 | X-025625Y009825 176 | X-021150Y010025 177 | X-020150Y010025 178 | X-018525Y010025 179 | X-020650Y012175 180 | X-019650Y012175 181 | X-015350Y012000 182 | X008000Y029725 183 | X-003175Y012300 184 | X-014900Y012500 185 | X000500Y027750 186 | X001375Y026875 187 | X001375Y028625 188 | X000500Y029500 189 | X000525Y030850 190 | X-018575Y015200 191 | X-019200Y015700 192 | X-018575Y016200 193 | X-019200Y016700 194 | X-018550Y017200 195 | X-001050Y034475 196 | X-001650Y035800 197 | X-019200Y018200 198 | X-018575Y018700 199 | X-019025Y030400 200 | X-019525Y029775 201 | X-020025Y030400 202 | X-017025Y030625 203 | X-016602Y029925 204 | X005075Y041650 205 | X-004650Y000600 206 | X-004250Y-000825 207 | X005900Y012725 208 | X006875Y011475 209 | X005525Y029500 210 | X004900Y028250 211 | X001250Y039200 212 | X-019025Y021750 213 | X-024550Y051975 214 | X-024567Y056771 215 | X008225Y011250 216 | X006550Y032725 217 | X006550Y034725 218 | X005975Y033725 219 | X-006075Y040050 220 | X-007075Y039350 221 | X-008075Y038475 222 | X-005800Y052950 223 | X-007425Y052950 224 | X-009825Y052950 225 | X-024125Y060825 226 | X-024125Y059550 227 | X-026875Y055625 228 | X-026900Y052625 229 | X-012625Y056425 230 | X-022600Y061825 231 | X-008475Y-000525 232 | X000675Y015625 233 | X001575Y016700 234 | X000675Y020250 235 | X001575Y021050 236 | X-008000Y060000 237 | X-006450Y059025 238 | X-026775Y045075 239 | X-019675Y046600 240 | X-021225Y045550 241 | X-011725Y045700 242 | X-011225Y043825 243 | X-012225Y043825 244 | X-013225Y043825 245 | X-014225Y043825 246 | X-013725Y045700 247 | X-012725Y045700 248 | X-019225Y045700 249 | X-020725Y043825 250 | X-019725Y043825 251 | X-018725Y043825 252 | X-017725Y043825 253 | X-018225Y045700 254 | X-016225Y043825 255 | X-015725Y045700 256 | X-015225Y043825 257 | X-014725Y045550 258 | X-014750Y015200 259 | X-014000Y015200 260 | X-015000Y023700 261 | X-012225Y015225 262 | X-014000Y017225 263 | X-014025Y019200 264 | X-012225Y016250 265 | X-012250Y019225 266 | X-012200Y022250 267 | X-012200Y023200 268 | X-012225Y018275 269 | X-011275Y022250 270 | X004175Y-002375 271 | X-015775Y029200 272 | X-019025Y038450 273 | X-019025Y036550 274 | X-015900Y036525 275 | X001075Y011800 276 | X000075Y011800 277 | X-000950Y010025 278 | X-001950Y010025 279 | X-000325Y031875 280 | X-006300Y016950 281 | X-016550Y016100 282 | X-023875Y043836 283 | X-004223Y046273 284 | X003525Y044125 285 | X008000Y049925 286 | X005675Y050125 287 | X-020625Y056422 288 | X-018150Y058275 289 | X004575Y043775 290 | X003300Y048850 291 | X005975Y048275 292 | X005575Y043775 293 | X-019125Y060725 294 | X-009400Y044075 295 | X-019600Y049925 296 | X-022100Y058425 297 | X-022050Y010250 298 | X001525Y049150 299 | X002275Y049525 300 | X-019125Y059425 301 | X-022300Y055650 302 | X-023825Y055300 303 | X-023825Y054475 304 | X-022300Y054125 305 | X-031225Y047050 306 | X-030625Y046025 307 | X-031200Y045025 308 | X-029525Y047550 309 | X-022525Y052900 310 | T02 311 | X-023750Y008200 312 | X-017450Y003725 313 | X-010900Y009625 314 | X-011367Y004075 315 | X-005125Y003325 316 | X-010525Y-002200 317 | X001075Y008225 318 | X-000125Y-002375 319 | X002300Y-026000 320 | X000100Y-012100 321 | X001200Y-018300 322 | X-011900Y-017575 323 | X-011900Y-012475 324 | X-022700Y-018200 325 | X-023350Y-012575 326 | X-023025Y-022525 327 | X-011900Y-023175 328 | X000200Y-023100 329 | X-012125Y-006750 330 | X-023600Y-000300 331 | X001350Y-005800 332 | X-023450Y-006475 333 | X-009125Y006225 334 | X-005175Y-004425 335 | X-007745Y-005981 336 | X-005325Y-007775 337 | X-005325Y-008625 338 | X-005700Y-012525 339 | X-004175Y-011850 340 | X-004750Y-017625 341 | X-004000Y-012500 342 | X-016000Y-006750 343 | X-008400Y-013200 344 | X-007400Y-010100 345 | X-007550Y-020100 346 | X-003075Y-020825 347 | X-005150Y-020825 348 | X-006200Y-017375 349 | X-005275Y-018800 350 | X-002325Y-018800 351 | X-001900Y-025875 352 | X000100Y-025875 353 | X-027800Y000300 354 | X-026375Y002600 355 | X-028325Y004825 356 | X-003825Y-018800 357 | X-002425Y-014050 358 | X-003275Y-014050 359 | X-019850Y-013100 360 | X-018925Y-012525 361 | X-026375Y-009925 362 | X-026750Y-012075 363 | X-013950Y-003300 364 | X-015175Y-003850 365 | X-013525Y-009200 366 | X-016800Y-008550 367 | X-015450Y-008550 368 | X-009775Y-010100 369 | X-017475Y-011275 370 | X-016750Y-012500 371 | X-025650Y004325 372 | X007000Y-009875 373 | X-019050Y-005525 374 | X-020401Y007426 375 | X-030700Y031650 376 | X-030000Y030950 377 | X-029025Y030550 378 | X-028075Y030500 379 | X-027042Y030500 380 | X-026008Y030500 381 | X-024975Y030500 382 | X-023942Y030500 383 | X-022908Y030500 384 | X-021875Y030500 385 | X-022900Y032050 386 | X-023935Y032050 387 | X-024970Y032050 388 | X-026005Y032050 389 | X-027040Y032050 390 | X-028075Y032050 391 | X-029025Y032175 392 | X-001575Y008650 393 | X-003425Y010000 394 | X-019400Y042325 395 | X002400Y-000150 396 | X004675Y-011125 397 | X004275Y-009125 398 | X003550Y-013900 399 | X-011975Y027725 400 | X-026150Y046950 401 | X-019750Y039100 402 | X-021525Y037775 403 | X-023750Y036370 404 | X000250Y045600 405 | X-005675Y048675 406 | X-010900Y028175 407 | X-015750Y028175 408 | X-005950Y031675 409 | X-005350Y025800 410 | X-021700Y050875 411 | X-022900Y050875 412 | X-000775Y049975 413 | X-001375Y043650 414 | X-000350Y043650 415 | X000375Y043650 416 | X001325Y043650 417 | X-015775Y049250 418 | X-015775Y048325 419 | X-000925Y041650 420 | X-001950Y041650 421 | X-017575Y041700 422 | X-018475Y042325 423 | X002550Y021050 424 | X-003925Y041650 425 | X-007475Y027450 426 | X000400Y040100 427 | X001350Y040675 428 | X-020325Y060075 429 | X-020325Y058750 430 | X-003244Y049312 431 | X-001975Y048700 432 | X000600Y050975 433 | X-003463Y050325 434 | X-003463Y051425 435 | X-003463Y052525 436 | X-011725Y040900 437 | X004075Y015550 438 | X004075Y014725 439 | X-015575Y-016350 440 | X-016075Y-018500 441 | X-017000Y-019050 442 | X-006725Y-015075 443 | X-006725Y-016375 444 | X-014925Y-019050 445 | X-016825Y-016175 446 | X-014825Y-017600 447 | X-014075Y-019900 448 | X-014425Y-018375 449 | X-028025Y-009350 450 | X-028025Y-008200 451 | X-028025Y-007050 452 | X-001825Y047825 453 | X-001050Y047825 454 | X-000575Y045600 455 | X004675Y048400 456 | X002750Y051075 457 | X003575Y041300 458 | X-010650Y023225 459 | X-005000Y015850 460 | X-002875Y015850 461 | X006400Y012050 462 | X-002975Y030875 463 | X-002975Y031950 464 | X-010925Y016050 465 | X-010050Y016050 466 | X-009225Y016050 467 | X-004950Y044650 468 | X-004925Y041500 469 | X-004925Y043550 470 | X-008775Y046125 471 | X-008700Y045225 472 | X-008400Y031775 473 | X-007475Y026575 474 | X-005950Y022850 475 | X-009700Y022250 476 | X-010800Y017725 477 | X-009250Y017725 478 | X-005350Y017750 479 | X-001775Y017800 480 | X000150Y021600 481 | X-003300Y034900 482 | X-002050Y039225 483 | X005175Y032500 484 | X-009700Y050300 485 | X-011588Y049725 486 | X-012850Y049725 487 | X-011588Y047887 488 | X-012850Y047887 489 | X-014075Y047887 490 | X-017725Y051325 491 | X-016463Y051325 492 | X-024550Y034400 493 | X-024550Y035662 494 | X-024250Y018575 495 | X-024250Y019837 496 | X-025150Y011625 497 | X-023888Y011625 498 | X-027800Y015275 499 | X-027800Y016537 500 | X-029925Y020825 501 | X-029925Y022087 502 | X-015100Y-014275 503 | X-017525Y-012500 504 | X-019925Y-018300 505 | X-018575Y-019025 506 | X004375Y-017525 507 | X003400Y-016100 508 | X004400Y-013900 509 | X-005950Y-015675 510 | X-003275Y-009350 511 | X-002475Y004950 512 | X-020200Y-003500 513 | X-024575Y041775 514 | X-026650Y046025 515 | X-023200Y044575 516 | X-023425Y047875 517 | X-017675Y047900 518 | X-019425Y047900 519 | X-021475Y047900 520 | X-029950Y050825 521 | X-029950Y053450 522 | X-029950Y056525 523 | X-028100Y050825 524 | X-028075Y056550 525 | X-028075Y059700 526 | X-021350Y060875 527 | X-014250Y052700 528 | X-017525Y060150 529 | X-014100Y060750 530 | X-010025Y060775 531 | X-005700Y052050 532 | X-008925Y052025 533 | X005400Y051025 534 | X-004900Y039900 535 | X002125Y020250 536 | X003050Y017625 537 | X-021100Y-000850 538 | X-007426Y036725 539 | X000399Y033625 540 | X-000375Y017825 541 | T03 542 | X-011975Y026250 543 | T04 544 | X-002025Y-009225 545 | X-002600Y-004800 546 | M30 547 | -------------------------------------------------------------------------------- /Hardware/V2.0/Gerber/Gerber_BoardOutlineLayer.GKO: -------------------------------------------------------------------------------- 1 | G04 Layer: BoardOutlineLayer* 2 | G04 EasyEDA v6.5.21, 2022-10-22 15:56:40* 3 | G04 9ab0f769691e454ba0e7696980ab9178,294cf934c43b457281b0b0dcd80bbfec,10* 4 | G04 Gerber Generator version 0.2* 5 | G04 Scale: 100 percent, Rotated: No, Reflected: No * 6 | G04 Dimensions in millimeters * 7 | G04 leading zeros omitted , absolute positions ,4 integer and 5 decimal * 8 | %FSLAX45Y45*% 9 | %MOMM*% 10 | 11 | %ADD10C,0.2540*% 12 | D10* 13 | X-3031444Y-1109068D02* 14 | G01* 15 | X-3031444Y552165D01* 16 | X-3033984Y577565D01* 17 | X-3039064Y600425D01* 18 | X-3049224Y623285D01* 19 | X-3061924Y643605D01* 20 | X-3074624Y663925D01* 21 | X-3092404Y676625D01* 22 | X-3120344Y689325D01* 23 | X-3145744Y696945D01* 24 | X-3163524Y707105D01* 25 | X-3183844Y724885D01* 26 | X-3224197Y755898D01* 27 | X927498Y4182491D02* 28 | G01* 29 | X927498Y3571763D01* 30 | X-2973024Y6645625D02* 31 | G01* 32 | X-3121088Y6497561D01* 33 | X-3168604Y6462745D01* 34 | X-3211784Y6432265D01* 35 | X-3227024Y6417025D01* 36 | X-3227024Y3920205D01* 37 | X-3175840Y3869024D01* 38 | X920795Y2629524D02* 39 | G01* 40 | X920795Y1113505D01* 41 | X-3140664Y2568925D02* 42 | G01* 43 | X-3140664Y1140320D01* 44 | X868715Y-1197152D02* 45 | G01* 46 | X839515Y-1182654D01* 47 | X814115Y-1167414D01* 48 | X793795Y-1144554D01* 49 | X786175Y-1124234D01* 50 | X783635Y-1093754D01* 51 | X783635Y574050D01* 52 | X-2409070Y-2892074D02* 53 | G01* 54 | X-2452324Y-2892074D01* 55 | X-2584404Y-2886994D01* 56 | X-2686004Y-2881914D01* 57 | X-2716484Y-2871754D01* 58 | X-2739344Y-2856514D01* 59 | X-2759664Y-2833654D01* 60 | X-2790144Y-2787934D01* 61 | X-2879044Y-2640614D01* 62 | X-2978104Y-2467894D01* 63 | X-3074624Y-2290094D01* 64 | X-3206704Y-2056414D01* 65 | X-2045924Y-2912394D02* 66 | G01* 67 | X-2051004Y-2912394D01* 68 | X-2188164Y-2912394D01* 69 | X-2221184Y-2914934D01* 70 | X-2244044Y-2920014D01* 71 | X-2335484Y-2922554D01* 72 | X-499861Y-2892074D02* 73 | G01* 74 | X-659084Y-2892074D01* 75 | X-692104Y-2881914D01* 76 | X-1929084Y-2881914D01* 77 | X-1972337Y-2881914D01* 78 | X-143464Y-2912394D02* 79 | G01* 80 | X-450804Y-2912394D01* 81 | X928415Y-1446814D02* 82 | G01* 83 | X913175Y-1467134D01* 84 | X897935Y-1497614D01* 85 | X887775Y-1525554D01* 86 | X882695Y-1553494D01* 87 | X882695Y-2168174D01* 88 | X880155Y-2178334D01* 89 | X872535Y-2196114D01* 90 | X857295Y-2216434D01* 91 | X275635Y-2861594D01* 92 | X255315Y-2881914D01* 93 | X234995Y-2889534D01* 94 | X-72344Y-2889534D01* 95 | X-88275Y-2889534D01* 96 | X1004615Y785845D02* 97 | G01* 98 | X969055Y762985D01* 99 | X941115Y745205D01* 100 | X897935Y704565D01* 101 | X854755Y681705D01* 102 | X816655Y653765D01* 103 | X984166Y1015481D02* 104 | G01* 105 | X945301Y1054346D01* 106 | X953815Y2810662D02* 107 | G01* 108 | X953815Y2709242D01* 109 | X933495Y2897096D02* 110 | G01* 111 | X933495Y2859719D01* 112 | X978291Y2992180D02* 113 | G01* 114 | X969055Y2982945D01* 115 | X965824Y3245256D02* 116 | G01* 117 | X994455Y3216625D01* 118 | X994455Y3031205D01* 119 | X933495Y3329076D02* 120 | G01* 121 | X933495Y3323305D01* 122 | X958895Y3495410D02* 123 | G01* 124 | X958895Y3390399D01* 125 | X923335Y4191985D02* 126 | G01* 127 | X882622Y4232701D01* 128 | X839515Y4585144D02* 129 | G01* 130 | X839515Y4336765D01* 131 | X904758Y4704270D02* 132 | G01* 133 | X877615Y4677125D01* 134 | X933495Y5218656D02* 135 | G01* 136 | X933495Y4773645D01* 137 | X994455Y5801113D02* 138 | G01* 139 | X994455Y5365826D01* 140 | X979215Y5837905D02* 141 | G01* 142 | X969236Y5847885D01* 143 | X925875Y5865845D02* 144 | G01* 145 | X914587Y5865845D01* 146 | X811575Y6561010D02* 147 | G01* 148 | X811575Y5979634D01* 149 | X791255Y6610065D02* 150 | G01* 151 | X773219Y6628102D01* 152 | X712515Y6653245D02* 153 | G01* 154 | X454413Y6653245D01* 155 | X374695Y6686265D02* 156 | G01* 157 | X52115Y6686265D01* 158 | X-15336Y6658325D02* 159 | G01* 160 | X-742904Y6658325D01* 161 | X-826056Y6575176D01* 162 | X-925784Y6533865D02* 163 | G01* 164 | X-1309654Y6533865D01* 165 | X-1426164Y6582125D02* 166 | G01* 167 | X-1478272Y6634233D01* 168 | X-1530304Y6655785D02* 169 | G01* 170 | X-1820992Y6655785D01* 171 | X-1888444Y6683725D02* 172 | G01* 173 | X-2185624Y6683725D01* 174 | X-2234681Y6663405D02* 175 | G01* 176 | X-2930100Y6663405D01* 177 | X-3138124Y3777965D02* 178 | G01* 179 | X-3138124Y3500414D01* 180 | X-3160984Y3445225D02* 181 | G01* 182 | X-3161855Y3444354D01* 183 | X-3176224Y3409665D02* 184 | G01* 185 | X-3176224Y3336622D01* 186 | X-3209244Y3134263D02* 187 | G01* 188 | X-3209244Y2947385D01* 189 | X-3177766Y2915907D01* 190 | X-3150824Y2850865D02* 191 | G01* 192 | X-3150824Y2818206D01* 193 | X-3176224Y2756885D02* 194 | G01* 195 | X-3176224Y2653799D01* 196 | X-3172993Y2646974D02* 197 | G01* 198 | X-3173684Y2647665D01* 199 | X-3168604Y1072865D02* 200 | G01* 201 | X-3254964Y986505D01* 202 | X-3061924Y-1182654D02* 203 | G01* 204 | X-3202622Y-1323352D01* 205 | X-3229564Y-1388394D02* 206 | G01* 207 | X-3229564Y-2001225D01* 208 | G75* 209 | G01* 210 | X928416Y-1446814D02* 211 | G03* 212 | X868716Y-1197153I-127000J101599D01* 213 | G75* 214 | G01* 215 | X816656Y653766D02* 216 | G03* 217 | X783636Y574049I79717J-79718D01* 218 | G75* 219 | G01* 220 | X1004616Y785846D02* 221 | G03* 222 | X984166Y1015481I-101600J106680D01* 223 | G75* 224 | G01* 225 | X920796Y1113506D02* 226 | G03* 227 | X945302Y1054346I83666J1D01* 228 | G75* 229 | G01* 230 | X946196Y2690846D02* 231 | G03* 232 | X920796Y2629525I61321J-61321D01* 233 | G75* 234 | G01* 235 | X946196Y2690846D02* 236 | G03* 237 | X953816Y2709243I-18396J18397D01* 238 | G75* 239 | G01* 240 | X953816Y2810662D02* 241 | G03* 242 | X948736Y2822926I-17344J-1D01* 243 | G75* 244 | G01* 245 | X933496Y2859719D02* 246 | G03* 247 | X948736Y2822926I52032J-1D01* 248 | G75* 249 | G01* 250 | X969056Y2982946D02* 251 | G03* 252 | X933496Y2897097I85849J-85849D01* 253 | G75* 254 | G01* 255 | X978291Y2992181D02* 256 | G03* 257 | X994456Y3031206I-39024J39025D01* 258 | G75* 259 | G01* 260 | X933496Y3323306D02* 261 | G03* 262 | X965825Y3245256I110377J-1D01* 263 | G75* 264 | G01* 265 | X956356Y3384266D02* 266 | G03* 267 | X933496Y3329077I55189J-55189D01* 268 | G75* 269 | G01* 270 | X956356Y3384266D02* 271 | G03* 272 | X958896Y3390398I-6132J6132D01* 273 | G75* 274 | G01* 275 | X958896Y3495410D02* 276 | G03* 277 | X951276Y3513806I-26016J-1D01* 278 | G75* 279 | G01* 280 | X928416Y3568995D02* 281 | G03* 282 | X951276Y3513806I78049J-1D01* 283 | G75* 284 | G01* 285 | X928416Y4179722D02* 286 | G03* 287 | X923336Y4191986I-17344J0D01* 288 | G75* 289 | G01* 290 | X839516Y4336766D02* 291 | G03* 292 | X882622Y4232701I147170J1D01* 293 | G75* 294 | G01* 295 | X877616Y4677126D02* 296 | G03* 297 | X839516Y4585145I91981J-91981D01* 298 | G75* 299 | G01* 300 | X904758Y4704269D02* 301 | G03* 302 | X933496Y4773646I-69376J69378D01* 303 | G75* 304 | G01* 305 | X969056Y5304506D02* 306 | G03* 307 | X933496Y5218656I85849J-85850D01* 308 | G75* 309 | G01* 310 | X969056Y5304506D02* 311 | G03* 312 | X994456Y5365827I-61321J61321D01* 313 | G75* 314 | G01* 315 | X994456Y5801114D02* 316 | G03* 317 | X979216Y5837906I-52033J-1D01* 318 | G75* 319 | G01* 320 | X969236Y5847885D02* 321 | G03* 322 | X925876Y5865846I-43361J-43359D01* 323 | G75* 324 | G01* 325 | X847136Y5893786D02* 326 | G03* 327 | X914588Y5865846I67453J67453D01* 328 | G75* 329 | G01* 330 | X811576Y5979636D02* 331 | G03* 332 | X847136Y5893786I121409J0D01* 333 | G75* 334 | G01* 335 | X811576Y6561011D02* 336 | G03* 337 | X791256Y6610066I-69377J-2D01* 338 | G75* 339 | G01* 340 | X773222Y6628102D02* 341 | G03* 342 | X712516Y6653246I-60705J-60705D01* 343 | G75* 344 | G01* 345 | X374696Y6686266D02* 346 | G03* 347 | X454414Y6653246I79716J79718D01* 348 | G75* 349 | G01* 350 | X-15337Y6658326D02* 351 | G03* 352 | X52116Y6686266I0J95393D01* 353 | G75* 354 | G01* 355 | X-925784Y6533866D02* 356 | G03* 357 | X-826056Y6575176I-3J141038D01* 358 | G75* 359 | G01* 360 | X-1426164Y6582126D02* 361 | G03* 362 | X-1309654Y6533866I116510J116510D01* 363 | G75* 364 | G01* 365 | X-1478272Y6634234D02* 366 | G03* 367 | X-1530304Y6655786I-52034J-52034D01* 368 | G75* 369 | G01* 370 | X-1888444Y6683726D02* 371 | G03* 372 | X-1820992Y6655786I67453J67453D01* 373 | G75* 374 | G01* 375 | X-2234682Y6663406D02* 376 | G03* 377 | X-2185624Y6683726I0J69376D01* 378 | G75* 379 | G01* 380 | X-2930101Y6663406D02* 381 | G03* 382 | X-2973024Y6645626I1J-60705D01* 383 | G75* 384 | G01* 385 | X-3138124Y3777966D02* 386 | G03* 387 | X-3175841Y3869025I-128774J2D01* 388 | G75* 389 | G01* 390 | X-3160984Y3445226D02* 391 | G03* 392 | X-3138124Y3500415I-55189J55189D01* 393 | G75* 394 | G01* 395 | X-3161856Y3444355D02* 396 | G03* 397 | X-3176224Y3409666I34689J-34689D01* 398 | G75* 399 | G01* 400 | X-3176224Y3336622D02* 401 | G03* 402 | X-3168604Y3318226I26016J1D01* 403 | G75* 404 | G01* 405 | X-3150824Y3275302D02* 406 | G03* 407 | X-3168604Y3318226I-60705J0D01* 408 | G75* 409 | G01* 410 | X-3199498Y3157792D02* 411 | G03* 412 | X-3150824Y3275302I-117509J117509D01* 413 | G75* 414 | G01* 415 | X-3199498Y3157792D02* 416 | G03* 417 | X-3209244Y3134263I23529J-23530D01* 418 | G75* 419 | G01* 420 | X-3150824Y2850866D02* 421 | G03* 422 | X-3177766Y2915907I-91982J-1D01* 423 | G75* 424 | G01* 425 | X-3176224Y2756886D02* 426 | G03* 427 | X-3150824Y2818207I-61321J61321D01* 428 | G75* 429 | G01* 430 | X-3176224Y2653800D02* 431 | G03* 432 | X-3173684Y2647666I8672J-2D01* 433 | G75* 434 | G01* 435 | X-3140664Y2568926D02* 436 | G03* 437 | X-3172993Y2646975I-110378J0D01* 438 | G75* 439 | G01* 440 | X-3168604Y1072866D02* 441 | G03* 442 | X-3140664Y1140320I-67453J67453D01* 443 | G75* 444 | G01* 445 | X-3254964Y986506D02* 446 | G03* 447 | X-3224197Y755899I99060J-104139D01* 448 | G75* 449 | G01* 450 | X-3061924Y-1182654D02* 451 | G03* 452 | X-3031444Y-1109068I-73586J73585D01* 453 | G75* 454 | G01* 455 | X-3202622Y-1323353D02* 456 | G03* 457 | X-3229564Y-1388394I65039J-65041D01* 458 | G75* 459 | G01* 460 | X-3229564Y-2001225D02* 461 | G03* 462 | X-3206704Y-2056414I78049J-1D01* 463 | G75* 464 | G01* 465 | X-450804Y-2912394D02* 466 | G03* 467 | X-499862Y-2892074I-49057J-49057D01* 468 | G75* 469 | G01* 470 | X-88275Y-2889534D02* 471 | G03* 472 | X-143464Y-2912394I0J-78049D01* 473 | G75* 474 | G01* 475 | X-1972338Y-2881914D02* 476 | G03* 477 | X-2045924Y-2912394I-1J-104066D01* 478 | G75* 479 | G01* 480 | X-2335484Y-2922554D02* 481 | G03* 482 | X-2409071Y-2892074I-73586J-73586D01* 483 | X-686653Y-2257435D02* 484 | G01* 485 | X-706973Y-2206635D01* 486 | G75* 487 | G01* 488 | X-706973Y-2206635D02* 489 | G02* 490 | X-565475Y-2150034I70845J28059D01* 491 | X-565475Y-2150033D02* 492 | G01* 493 | X-545155Y-2200833D01* 494 | G75* 495 | G01* 496 | X-545155Y-2200834D02* 497 | G02* 498 | X-686653Y-2257435I-70846J-28059D01* 499 | X-686653Y-2257435D02* 500 | G01* 501 | X-686653Y-2257435D01* 502 | X-3009854Y-1601754D02* 503 | G01* 504 | X-3009854Y-1647474D01* 505 | G75* 506 | G01* 507 | X-3009854Y-1647474D02* 508 | G02* 509 | X-3149554Y-1647474I-69850J0D01* 510 | X-3149554Y-1647474D02* 511 | G01* 512 | X-3149554Y-1601754D01* 513 | G75* 514 | G01* 515 | X-3149554Y-1601754D02* 516 | G02* 517 | X-3009854Y-1601754I69850J0D01* 518 | X-3009854Y-1601754D02* 519 | G01* 520 | X-3009854Y-1601754D01* 521 | G75* 522 | G01* 523 | X844595Y5609505D02* 524 | G02* 525 | X755696Y5698172I0J88900D01* 526 | X755695Y5698172D02* 527 | G01* 528 | X755695Y5698638D01* 529 | G75* 530 | G01* 531 | X755696Y5698639D02* 532 | G02* 533 | X844595Y5787305I88899J-234D01* 534 | X844595Y5787305D02* 535 | G01* 536 | X844595Y5787305D01* 537 | G75* 538 | G01* 539 | X844595Y5787305D02* 540 | G02* 541 | X933495Y5698405I0J-88900D01* 542 | G75* 543 | G01* 544 | X933495Y5698405D02* 545 | G02* 546 | X844595Y5609505I-88900J0D01* 547 | X844595Y5609505D02* 548 | G01* 549 | X844595Y5609505D01* 550 | G75* 551 | G01* 552 | X892854Y805854D02* 553 | G02* 554 | X798835Y899874I0J94020D01* 555 | G75* 556 | G01* 557 | X798835Y899874D02* 558 | G02* 559 | X798834Y899926I94018J485D01* 560 | X798834Y899926D02* 561 | G01* 562 | X798834Y899696D01* 563 | X798834Y899696D02* 564 | G01* 565 | X798838Y900680D01* 566 | G75* 567 | G01* 568 | X798838Y900681D02* 569 | G02* 570 | X892854Y993894I94016J-807D01* 571 | X892854Y993893D02* 572 | G01* 573 | X892854Y993893D01* 574 | G75* 575 | G01* 576 | X892854Y993894D02* 577 | G02* 578 | X986874Y899874I0J-94020D01* 579 | G75* 580 | G01* 581 | X986874Y899874D02* 582 | G02* 583 | X892854Y805854I-94020J0D01* 584 | X892854Y805854D02* 585 | G01* 586 | X892854Y805854D01* 587 | G75* 588 | G01* 589 | X-3130159Y798421D02* 590 | G02* 591 | X-3227024Y895032I0J96865D01* 592 | X-3227024Y895032D02* 593 | G01* 594 | X-3227022Y895286D01* 595 | G75* 596 | G01* 597 | X-3227022Y895286D02* 598 | G02* 599 | X-3227023Y895295I12694J389D01* 600 | X-3227022Y895294D02* 601 | G01* 602 | X-3227021Y895228D01* 603 | X-3227021Y895228D02* 604 | G01* 605 | X-3227024Y895540D01* 606 | G75* 607 | G01* 608 | X-3227024Y895541D02* 609 | G02* 610 | X-3130159Y992152I96865J-254D01* 611 | X-3130158Y992152D02* 612 | G01* 613 | X-3130158Y992152D01* 614 | G75* 615 | G01* 616 | X-3130159Y992152D02* 617 | G02* 618 | X-3033293Y895286I0J-96865D01* 619 | X-3033293Y895286D02* 620 | G01* 621 | X-3033293Y895286D01* 622 | G75* 623 | G01* 624 | X-3033293Y895286D02* 625 | G02* 626 | X-3130159Y798421I-96866J1D01* 627 | X-3130158Y798420D02* 628 | G01* 629 | X-3130158Y798420D01* 630 | X-3227024Y894998D02* 631 | G01* 632 | X-3227024Y895065D01* 633 | G75* 634 | G01* 635 | X-3227024Y895066D02* 636 | G02* 637 | X-3227024Y895074I12700J4D01* 638 | X-3227024Y895073D02* 639 | G01* 640 | X-3227024Y894998D01* 641 | X755695Y5698206D02* 642 | G01* 643 | X755695Y5698172D01* 644 | G75* 645 | G01* 646 | X755696Y5698172D02* 647 | G02* 648 | X755696Y5698140I-12700J-117D01* 649 | X755695Y5698140D02* 650 | G01* 651 | X755695Y5698206D01* 652 | X755697Y5698396D02* 653 | G01* 654 | X755695Y5698463D01* 655 | G75* 656 | G01* 657 | X755696Y5698464D02* 658 | G03* 659 | X755695Y5698472I-12695J-381D01* 660 | X755695Y5698471D02* 661 | G01* 662 | X755697Y5698396D01* 663 | X-2474993Y-2622494D02* 664 | G01* 665 | X-2474993Y-3099993D01* 666 | X-2474993Y-3099993D02* 667 | G01* 668 | X-267497Y-3099993D01* 669 | X-267497Y-3099993D02* 670 | G01* 671 | X-267497Y-2622494D01* 672 | X-267497Y-2622494D02* 673 | G01* 674 | X-2474993Y-2622494D01* 675 | 676 | %LPD*% 677 | M02* 678 | -------------------------------------------------------------------------------- /Hardware/V2.0/Gerber/Gerber_MechanicalLayer.GME: -------------------------------------------------------------------------------- 1 | G04 Layer: MechanicalLayer* 2 | G04 EasyEDA v6.5.21, 2022-10-22 15:56:40* 3 | G04 9ab0f769691e454ba0e7696980ab9178,294cf934c43b457281b0b0dcd80bbfec,10* 4 | G04 Gerber Generator version 0.2* 5 | G04 Scale: 100 percent, Rotated: No, Reflected: No * 6 | G04 Dimensions in millimeters * 7 | G04 leading zeros omitted , absolute positions ,4 integer and 5 decimal * 8 | %FSLAX45Y45*% 9 | %MOMM*% 10 | 11 | %ADD10C,0.0500*% 12 | %ADD11C,0.1000*% 13 | 14 | %LPD*% 15 | D10* 16 | X232989Y4369831D02* 17 | G01* 18 | X232989Y4989830D01* 19 | X-387009Y4989830D01* 20 | X-387009Y4369831D01* 21 | X232989Y4369831D01* 22 | D11* 23 | X-127010Y4679830D02* 24 | G01* 25 | X-27010Y4679830D01* 26 | X-77010Y4729830D02* 27 | G01* 28 | X-77010Y4629830D01* 29 | X172989Y4429831D02* 30 | G01* 31 | X172989Y4929830D01* 32 | X-327009Y4929830D01* 33 | X-327009Y4429831D01* 34 | X172989Y4429831D01* 35 | G75* 36 | G01* 37 | X-237010Y4789830D02* 38 | G03* 39 | X-237551Y4789833I-36J50000D01* 40 | M02* 41 | -------------------------------------------------------------------------------- /Hardware/V2.0/PCB_2022-10-22.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SudoMaker/Notkia/1771f270f00f99e85bcb6e1ae1ada391b81fb2f3/Hardware/V2.0/PCB_2022-10-22.pdf -------------------------------------------------------------------------------- /Hardware/V2.0/README.txt: -------------------------------------------------------------------------------- 1 | 2 | How to use: 3 | 4 | At editor, open the document via: Top menu - File - Open - EasyEDA... , and select the json file, then open it at the editor, you can save it into a project. 5 | 6 | 7 | 如何使用: 8 | 9 | 打开编辑器,通过:顶部菜单 - 文件 - 打开 - 立创EDA... ,选择 json 文件打开在编辑器,你可以保存文档进工程里面。 -------------------------------------------------------------------------------- /Hardware/V2.0/SMT/BOM_HD3S.PcbDoc_2022-10-22.csv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SudoMaker/Notkia/1771f270f00f99e85bcb6e1ae1ada391b81fb2f3/Hardware/V2.0/SMT/BOM_HD3S.PcbDoc_2022-10-22.csv -------------------------------------------------------------------------------- /Hardware/V2.0/SMT/PickAndPlace_HD3S.PcbDoc_2022-10-22.csv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SudoMaker/Notkia/1771f270f00f99e85bcb6e1ae1ada391b81fb2f3/Hardware/V2.0/SMT/PickAndPlace_HD3S.PcbDoc_2022-10-22.csv -------------------------------------------------------------------------------- /Hardware/V2.0/Schematic_NotKia 168x_2022-10-22.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SudoMaker/Notkia/1771f270f00f99e85bcb6e1ae1ada391b81fb2f3/Hardware/V2.0/Schematic_NotKia 168x_2022-10-22.pdf -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Notkia 2 | 3 | Files of the [Notkia project on Hackaday](https://hackaday.io/project/185645-notkia). 4 | 5 | ![EE4A1119__22](https://user-images.githubusercontent.com/34613827/197392521-d0fa9e3d-afaa-478a-bb0d-22756c4f6a2f.jpg) 6 | 7 | 8 | ## Notice 9 | This is only a DIY/maker/hobbyist project. **It has NOTHING to do with the Nokia Corporation.** 10 | 11 | **The "NOKIA" logo and trademark belongs to the Nokia Corporation.** 12 | 13 | ## Contents 14 | **Software** - Kernel patches, config, code, etc 15 | 16 | **Hardware** - Hardware design files 17 | 18 | **Resources** - Support materials like the docs of used components 19 | 20 | ## Quick guide 21 | Follow the build instructions on the Hackaday page. 22 | 23 | [Firmware download](https://drive.google.com/drive/folders/1oXkI3N4dK0Gwsrb4oEOyaak5tPrkD-Ys?usp=sharing) 24 | 25 | When the system is booted, you can connect USB cable and log into the device using the 2nd USB CDC-ACM device. USB RNDIS network is also activated at 192.168.77.2/24 w/o DHCP. SSH login information is root:notkia. 26 | 27 | Happy hacking! 28 | 29 | ## Notes 30 | If you have any questions, feel free to ask on our Twitter / Discord. 31 | -------------------------------------------------------------------------------- /Resources/2.0 S-5012-A(3).dwg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SudoMaker/Notkia/1771f270f00f99e85bcb6e1ae1ada391b81fb2f3/Resources/2.0 S-5012-A(3).dwg -------------------------------------------------------------------------------- /Resources/C2844071_32GBSDNANDMLC商业级_2022-07-05.PDF: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SudoMaker/Notkia/1771f270f00f99e85bcb6e1ae1ada391b81fb2f3/Resources/C2844071_32GBSDNANDMLC商业级_2022-07-05.PDF -------------------------------------------------------------------------------- /Resources/C2874595_TYPE-C母座卧贴端子镀金8.94X7.3X3.16MM_2021-08-10 (1).PDF: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SudoMaker/Notkia/1771f270f00f99e85bcb6e1ae1ada391b81fb2f3/Resources/C2874595_TYPE-C母座卧贴端子镀金8.94X7.3X3.16MM_2021-08-10 (1).PDF -------------------------------------------------------------------------------- /Resources/C2924400_BCT8890ELA-TR_2021-11-26 (1).PDF: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SudoMaker/Notkia/1771f270f00f99e85bcb6e1ae1ada391b81fb2f3/Resources/C2924400_BCT8890ELA-TR_2021-11-26 (1).PDF -------------------------------------------------------------------------------- /Resources/C496820_RGB三色共阳极624NM460NM_475NM515NM_535NM侧贴_2020-03-16.PDF: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SudoMaker/Notkia/1771f270f00f99e85bcb6e1ae1ada391b81fb2f3/Resources/C496820_RGB三色共阳极624NM460NM_475NM515NM_535NM侧贴_2020-03-16.PDF -------------------------------------------------------------------------------- /Resources/C506151_WD3153D-10_TR_2020-04-08 (3).PDF: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SudoMaker/Notkia/1771f270f00f99e85bcb6e1ae1ada391b81fb2f3/Resources/C506151_WD3153D-10_TR_2020-04-08 (3).PDF -------------------------------------------------------------------------------- /Resources/HJ-68LR.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SudoMaker/Notkia/1771f270f00f99e85bcb6e1ae1ada391b81fb2f3/Resources/HJ-68LR.pdf -------------------------------------------------------------------------------- /Resources/HJ-68LR_en.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SudoMaker/Notkia/1771f270f00f99e85bcb6e1ae1ada391b81fb2f3/Resources/HJ-68LR_en.pdf -------------------------------------------------------------------------------- /Resources/README.md: -------------------------------------------------------------------------------- 1 | # Resources 2 | 3 | ## Description 4 | 5 | Datasheets and support materials of components that are not easy to find on the Internet are uploaded here. 6 | 7 | Information of the rest components can be find on the Internet within a few minutes. 8 | -------------------------------------------------------------------------------- /Resources/YAMAHA-YMU762.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SudoMaker/Notkia/1771f270f00f99e85bcb6e1ae1ada391b81fb2f3/Resources/YAMAHA-YMU762.pdf -------------------------------------------------------------------------------- /Software/README.md: -------------------------------------------------------------------------------- 1 | # Software 2 | 3 | ## Usage 4 | ### Linux kernel 5 | - Download latest 5.19.x Linux kernel and apply the HUGE patch in **kernel** directory 6 | - Install MIPS toolchain, e.g. `apt install build-essential gcc-mipsel-linux-gnu` 7 | - Build the kernel image: `make ARCH=mips CROSS_COMPILE=mipsel-linux-gnu- -j8 uImage` 8 | 9 | ### rootfs 10 | - Download Buildroot 2022.02.2 and use the config file in **buildroot** directory. 11 | - Copy everything in the **rootfs-overlay** directory to the resulting rootfs. 12 | - Create the filesystem image using `mkfs.jffs2 -e 0x10000 --with-xattr -p -l` 13 | 14 | ### U-Boot, download tool and chip datasheets 15 | - Please visit [Ingenic Community](https://github.com/Ingenic-community). 16 | 17 | ### User Applications 18 | - See **sources** directory. 19 | 20 | ## Credits 21 | ### Demo songs 22 | **Palmtree.opus** - (C) SEGA, 1992. Downloaded from [here](https://www.youtube.com/watch?v=eQzrfwBFwQA) 23 | 24 | **Snowy.ogg** - Author: Chris Leutwyler 25 | 26 | ## Notes 27 | If you have any questions, feel free to ask on our Twitter / Discord. 28 | -------------------------------------------------------------------------------- /Software/rootfs-overlay/.gnuboy/gnuboy.rc: -------------------------------------------------------------------------------- 1 | set samplerate 48000 2 | set framelen 0 3 | 4 | bind f4 quit 5 | bind enter +a 6 | bind f3 +b 7 | bind tab +select 8 | bind backspace +start 9 | bind ctrl savestate 10 | bind shift loadstate 11 | -------------------------------------------------------------------------------- /Software/rootfs-overlay/etc/fstab: -------------------------------------------------------------------------------- 1 | # 2 | /dev/root / ext2 rw,noauto 0 1 3 | proc /proc proc defaults 0 0 4 | devpts /dev/pts devpts defaults,gid=5,mode=620,ptmxmode=0666 0 0 5 | tmpfs /dev/shm ramfs defaults 0 0 6 | tmpfs /tmp ramfs defaults 0 0 7 | tmpfs /run ramfs defaults,nosuid,nodev 0 0 8 | sysfs /sys sysfs defaults 0 0 9 | configfs /sys/kernel/config configfs defaults 0 0 10 | debugfs /sys/kernel/debug debugfs defaults 0 0 11 | 12 | -------------------------------------------------------------------------------- /Software/rootfs-overlay/etc/init.d/S10notkiaHW: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | start() { 4 | printf "Starting Notkia HW config: " 5 | /sbin/notkia-hw.sh \ 6 | && echo "OK" || echo "FAIL" 7 | } 8 | 9 | stop() { 10 | : 11 | } 12 | 13 | case "$1" in 14 | start) 15 | start 16 | ;; 17 | stop) 18 | stop 19 | ;; 20 | restart|reload) 21 | stop 22 | sleep 1 23 | start 24 | ;; 25 | *) 26 | echo "Usage: $0 {start|stop|restart}" 27 | exit 1 28 | esac 29 | -------------------------------------------------------------------------------- /Software/rootfs-overlay/etc/init.d/S11usbGadget: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | start() { 4 | printf "Starting USB gadget: " 5 | /sbin/notkia-usb-gadget.sh \ 6 | && echo "OK" || echo "FAIL" 7 | } 8 | 9 | stop() { 10 | : 11 | } 12 | 13 | case "$1" in 14 | start) 15 | start 16 | ;; 17 | stop) 18 | stop 19 | ;; 20 | restart|reload) 21 | stop 22 | sleep 1 23 | start 24 | ;; 25 | *) 26 | echo "Usage: $0 {start|stop|restart}" 27 | exit 1 28 | esac 29 | -------------------------------------------------------------------------------- /Software/rootfs-overlay/etc/init.d/S95mpd: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # Sanity checks 4 | test -f /etc/mpd.conf || exit 0 5 | mkdir -p /var/run/mpd/ 6 | 7 | start() { 8 | printf "Starting mpd: " 9 | start-stop-daemon --start --quiet --background --exec /usr/bin/mpd \ 10 | && echo "OK" || echo "FAIL" 11 | } 12 | 13 | stop() { 14 | printf "Stopping mpd: " 15 | start-stop-daemon --stop --quiet --pidfile /var/run/mpd.pid \ 16 | && echo "OK" || echo "FAIL" 17 | } 18 | 19 | case "$1" in 20 | start) 21 | start 22 | ;; 23 | stop) 24 | stop 25 | ;; 26 | restart|reload) 27 | stop 28 | sleep 1 29 | start 30 | ;; 31 | *) 32 | echo "Usage: $0 {start|stop|restart}" 33 | exit 1 34 | esac 35 | -------------------------------------------------------------------------------- /Software/rootfs-overlay/etc/inittab: -------------------------------------------------------------------------------- 1 | # /etc/inittab 2 | # 3 | # Copyright (C) 2001 Erik Andersen 4 | # 5 | # Note: BusyBox init doesn't support runlevels. The runlevels field is 6 | # completely ignored by BusyBox init. If you want runlevels, use 7 | # sysvinit. 8 | # 9 | # Format for each entry: ::: 10 | # 11 | # id == tty to run on, or empty for /dev/console 12 | # runlevels == ignored 13 | # action == one of sysinit, respawn, askfirst, wait, and once 14 | # process == program to run 15 | 16 | # Startup the system 17 | ::sysinit:/bin/mount -t proc proc /proc 18 | ::sysinit:/bin/mount -o remount,rw / 19 | ::sysinit:/bin/mkdir -p /dev/pts /dev/shm 20 | ::sysinit:/bin/mount -a 21 | ::sysinit:/bin/mkdir -p /run/lock/subsys 22 | ::sysinit:/sbin/swapon -a 23 | null::sysinit:/bin/ln -sf /proc/self/fd /dev/fd 24 | null::sysinit:/bin/ln -sf /proc/self/fd/0 /dev/stdin 25 | null::sysinit:/bin/ln -sf /proc/self/fd/1 /dev/stdout 26 | null::sysinit:/bin/ln -sf /proc/self/fd/2 /dev/stderr 27 | ::sysinit:/bin/hostname -F /etc/hostname 28 | # now run any rc scripts 29 | ::sysinit:/etc/init.d/rcS 30 | 31 | # Put a getty on the serial port 32 | 33 | ::respawn:-/bin/sh 34 | 35 | tty1::respawn:-/bin/sh 36 | tty1::respawn:-/sbin/t9uinput /dev/input/event0 1 37 | 38 | ttyGS1::respawn:-/bin/sh 39 | 40 | # Stuff to do for the 3-finger salute 41 | #::ctrlaltdel:/sbin/reboot 42 | 43 | # Stuff to do before rebooting 44 | ::shutdown:/etc/init.d/rcK 45 | ::shutdown:/sbin/swapoff -a 46 | ::shutdown:/bin/umount -a -r 47 | -------------------------------------------------------------------------------- /Software/rootfs-overlay/etc/libao.conf: -------------------------------------------------------------------------------- 1 | default_driver=alsa 2 | buffer_time=200 3 | quiet 4 | -------------------------------------------------------------------------------- /Software/rootfs-overlay/etc/mpd.conf: -------------------------------------------------------------------------------- 1 | # 2 | # Sample configuration file for mpd 3 | # This is a minimal configuration, see the manpage for more options 4 | # 5 | 6 | resampler { 7 | plugin "soxr" 8 | quality "very high" 9 | } 10 | 11 | audio_output { 12 | name "snd" 13 | type "alsa" 14 | device "hw:0,0" 15 | format "48000:16:2" 16 | auto_resample "no" 17 | auto_format "no" 18 | enabled "yes" 19 | } 20 | 21 | 22 | # Directory where the music is stored 23 | music_directory "/var/lib/mpd/music" 24 | 25 | # Directory where user-made playlists are stored (RW) 26 | playlist_directory "/var/lib/mpd/playlists" 27 | 28 | # Database file (RW) 29 | db_file "/var/lib/mpd/database" 30 | 31 | # Log file (RW) 32 | log_file "/var/log/mpd.log" 33 | 34 | # Process ID file (RW) 35 | pid_file "/var/run/mpd.pid" 36 | 37 | # State file (RW) 38 | state_file "/var/lib/mpd/state" 39 | 40 | # User id to run the daemon as 41 | #user "nobody" 42 | 43 | # TCP socket binding 44 | #bind_to_address "any" 45 | #bind_to_address "localhost" 46 | 47 | # Unix socket to listen on 48 | bind_to_address "/var/run/mpd/socket" 49 | -------------------------------------------------------------------------------- /Software/rootfs-overlay/usr/bin/fbgnuboy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SudoMaker/Notkia/1771f270f00f99e85bcb6e1ae1ada391b81fb2f3/Software/rootfs-overlay/usr/bin/fbgnuboy -------------------------------------------------------------------------------- /Software/rootfs-overlay/usr/bin/lora: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SudoMaker/Notkia/1771f270f00f99e85bcb6e1ae1ada391b81fb2f3/Software/rootfs-overlay/usr/bin/lora -------------------------------------------------------------------------------- /Software/rootfs-overlay/usr/bin/lvgl_demo: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | trap ctrl_c INT 4 | 5 | function ctrl_c() { 6 | killall lvgl_demo.real 7 | notkia-fbtft-bind.sh 8 | } 9 | 10 | notkia-fbtft-unbind.sh 11 | 12 | lvgl_demo.real "$@" & 13 | 14 | head -c 64 /dev/input/event1 > /dev/null 15 | killall lvgl_demo.real 16 | notkia-fbtft-bind.sh 17 | 18 | exit 0 19 | 20 | -------------------------------------------------------------------------------- /Software/rootfs-overlay/usr/bin/lvgl_demo.real: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SudoMaker/Notkia/1771f270f00f99e85bcb6e1ae1ada391b81fb2f3/Software/rootfs-overlay/usr/bin/lvgl_demo.real -------------------------------------------------------------------------------- /Software/rootfs-overlay/usr/sbin/blanker: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SudoMaker/Notkia/1771f270f00f99e85bcb6e1ae1ada391b81fb2f3/Software/rootfs-overlay/usr/sbin/blanker -------------------------------------------------------------------------------- /Software/rootfs-overlay/usr/sbin/notkia-fbtft-bind.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | echo spi1.0 > /sys/bus/spi/drivers/fb_st7789v/bind 4 | 5 | exit 0 6 | -------------------------------------------------------------------------------- /Software/rootfs-overlay/usr/sbin/notkia-fbtft-unbind.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | echo spi1.0 > /sys/bus/spi/drivers/fb_st7789v/unbind 4 | 5 | exit 0 6 | -------------------------------------------------------------------------------- /Software/rootfs-overlay/usr/sbin/notkia-hw.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # LCD coupe hack 4 | /sbin/notkia-fbtft-unbind.sh 5 | /sbin/blanker 6 | /sbin/notkia-fbtft-bind.sh 7 | echo 15 > /sys/class/leds/notkia::backlight/brightness 8 | sleep 0.5 9 | clear > /dev/tty1 10 | echo -ne "\nWelcome to Notkia!\n\n" > /dev/tty1 11 | 12 | # Audio AMP 13 | gpioset 5 12=0 14 | gpioset 5 11=0 15 | 16 | # BQ25895 CE 17 | gpioset 5 7=1 18 | 19 | exit 0 20 | -------------------------------------------------------------------------------- /Software/rootfs-overlay/usr/sbin/notkia-usb-gadget.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | cd /sys/kernel/config/usb_gadget/ 4 | 5 | mkdir g1 6 | cd g1 7 | 8 | echo "0x1d6b" > idVendor 9 | echo "0x0104" > idProduct 10 | 11 | mkdir strings/0x409 12 | echo "0123456789" > strings/0x409/serialnumber 13 | echo "SudoMaker" > strings/0x409/manufacturer 14 | echo "Notkia v2.0" > strings/0x409/product 15 | 16 | mkdir functions/acm.GS0 17 | mkdir functions/acm.GS1 18 | mkdir functions/rndis.usb0 19 | 20 | mkdir configs/c.1 21 | mkdir configs/c.1/strings/0x409 22 | echo "FumoFumo" > configs/c.1/strings/0x409/configuration 23 | ln -s functions/acm.GS0 configs/c.1 24 | ln -s functions/acm.GS1 configs/c.1 25 | ln -s functions/rndis.usb0 configs/c.1 26 | 27 | echo 13500000.usb > UDC 28 | 29 | # USB Network 30 | sleep 3 31 | ifconfig usb0 up 192.168.77.2 32 | 33 | exit 0 34 | -------------------------------------------------------------------------------- /Software/rootfs-overlay/usr/sbin/t9uinput: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SudoMaker/Notkia/1771f270f00f99e85bcb6e1ae1ada391b81fb2f3/Software/rootfs-overlay/usr/sbin/t9uinput -------------------------------------------------------------------------------- /Software/rootfs-overlay/var/lib/mpd/music/Palmtree.opus: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SudoMaker/Notkia/1771f270f00f99e85bcb6e1ae1ada391b81fb2f3/Software/rootfs-overlay/var/lib/mpd/music/Palmtree.opus -------------------------------------------------------------------------------- /Software/rootfs-overlay/var/lib/mpd/music/Snowy.ogg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SudoMaker/Notkia/1771f270f00f99e85bcb6e1ae1ada391b81fb2f3/Software/rootfs-overlay/var/lib/mpd/music/Snowy.ogg -------------------------------------------------------------------------------- /Software/sources/README.md: -------------------------------------------------------------------------------- 1 | # Sources 2 | 3 | ## Contents 4 | **lora** - Mini proof-of-concept LoRa messenger. Hardcoded at 433.92Mhz/22dBm/SF12/62.5kHz. 5 | 6 | **t9uinput** - Mini proof-of-concept T9 IME. 7 | 8 | **blanker.c** - Zero the VRAM of ST7789. Unbind FBTFT driver before use. 9 | 10 | **lvgl_demo.c** - LVGL demo (music player/stress test). Unbind FBTFT driver before use. 11 | 12 | 13 | ## Credits 14 | **ST7789-STM32** - https://github.com/Floyd-Fish/ST7789-STM32 15 | -------------------------------------------------------------------------------- /Software/sources/blanker.c: -------------------------------------------------------------------------------- 1 | /* 2 | This file is part of jz-diag-tools. 3 | Copyright (C) 2022 Reimu NotMoe 4 | 5 | This program is free software: you can redistribute it and/or modify 6 | it under the terms of the GNU Affero General Public License as 7 | published by the Free Software Foundation, either version 3 of the 8 | License, or (at your option) any later version. 9 | 10 | This program is distributed in the hope that it will be useful, 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | GNU Affero General Public License for more details. 14 | 15 | You should have received a copy of the GNU Affero General Public License 16 | along with this program. If not, see . 17 | */ 18 | 19 | #include 20 | #include 21 | #include 22 | #include 23 | #include 24 | #include 25 | #include 26 | #include 27 | #include 28 | 29 | #include 30 | 31 | #include "st7789.h" 32 | 33 | #define PERIPH_BASE 0x10000000 34 | 35 | volatile void *periph_phys = NULL; 36 | 37 | volatile XHAL_GPIO_TypeDef *xhgpioa = NULL; 38 | volatile XHAL_GPIO_TypeDef *xhgpiob = NULL; 39 | 40 | XHAL_SPI_HandleTypeDef xhspi = {0}; 41 | 42 | 43 | int main(int argc, char **argv) { 44 | int fd = open("/dev/mem", O_RDWR|O_SYNC); 45 | 46 | if (fd < 0) { 47 | perror("error: failed to open /dev/mem"); 48 | return 2; 49 | } 50 | 51 | periph_phys = mmap(NULL, 0x8000000, PROT_READ|PROT_WRITE, MAP_SHARED, fd, PERIPH_BASE); 52 | 53 | volatile uint32_t *reg_cpm_clkgr = periph_phys + 0x20; 54 | 55 | *reg_cpm_clkgr &= ~(1 << 19); 56 | 57 | if (periph_phys == MAP_FAILED) { 58 | perror("error: mmap failed"); 59 | return 2; 60 | } 61 | 62 | puts("mmap done"); 63 | 64 | xhgpioa = periph_phys + (XHAL_PHYSADDR_GPIO - PERIPH_BASE) + XHAL_GPIO_PORT_WIDTH * ('A' - 'A'); 65 | xhgpiob = periph_phys + (XHAL_PHYSADDR_GPIO - PERIPH_BASE) + XHAL_GPIO_PORT_WIDTH * ('B' - 'A'); 66 | 67 | // D_C 68 | XHAL_GPIO_SetAsGPIO(xhgpiob, 7, 0); 69 | puts("pb07 as output"); 70 | 71 | // RST 72 | XHAL_GPIO_SetAsGPIO(xhgpiob, 10, 0); 73 | puts("pb10 as output"); 74 | 75 | memset(&xhspi, 0, sizeof(XHAL_SPI_HandleTypeDef)); 76 | xhspi.periph = periph_phys + (XHAL_PHYSADDR_SPI - PERIPH_BASE); 77 | 78 | XHAL_SPI_Init(&xhspi); 79 | puts("XHAL_SPI_Init, wait"); 80 | 81 | // sleep(1); 82 | // puts("waited"); 83 | 84 | ST7789_Init(); 85 | puts("ST7789_Init"); 86 | 87 | return 0; 88 | } -------------------------------------------------------------------------------- /Software/sources/fonts.h: -------------------------------------------------------------------------------- 1 | #ifndef __FONT_H 2 | #define __FONT_H 3 | 4 | #include 5 | 6 | typedef struct { 7 | const uint8_t width; 8 | uint8_t height; 9 | const uint16_t *data; 10 | } FontDef; 11 | 12 | //Font lib. 13 | extern FontDef Font_7x10; 14 | extern FontDef Font_11x18; 15 | extern FontDef Font_16x26; 16 | 17 | //16-bit(RGB565) Image lib. 18 | /******************************************* 19 | * CAUTION: 20 | * If the MCU onchip flash cannot 21 | * store such huge image data,please 22 | * do not use it. 23 | * These pics are for test purpose only. 24 | *******************************************/ 25 | 26 | /* 128x128 pixel RGB565 image */ 27 | extern const uint16_t saber[][128]; 28 | 29 | /* 240x240 pixel RGB565 image 30 | extern const uint16_t knky[][240]; 31 | extern const uint16_t tek[][240]; 32 | extern const uint16_t adi1[][240]; 33 | */ 34 | #endif 35 | -------------------------------------------------------------------------------- /Software/sources/lora/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.22) 2 | project(sx126x_tool C) 3 | 4 | set(CMAKE_C_STANDARD 99) 5 | 6 | add_executable(sx126x_tool main.c sx126x.c sx126x_hal.c) 7 | target_link_libraries(sx126x_tool pthread) 8 | 9 | add_executable(lora main2.c sx126x.c sx126x_hal.c) 10 | target_link_libraries(lora pthread) -------------------------------------------------------------------------------- /Software/sources/lora/common.h: -------------------------------------------------------------------------------- 1 | // 2 | // Created by root on 6/12/22. 3 | // 4 | 5 | #pragma once 6 | 7 | #include 8 | #include 9 | #include 10 | #include 11 | #include 12 | 13 | #include 14 | #include 15 | #include 16 | #include 17 | 18 | #include 19 | #include 20 | #include 21 | #include 22 | 23 | #include 24 | #include 25 | #include 26 | #include 27 | 28 | #include 29 | -------------------------------------------------------------------------------- /Software/sources/lora/main.c: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 2022 Reimu NotMoe 3 | 4 | This program is free software: you can redistribute it and/or modify 5 | it under the terms of the GNU Affero General Public License as 6 | published by the Free Software Foundation, either version 3 of the 7 | License, or (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU Affero General Public License for more details. 13 | 14 | You should have received a copy of the GNU Affero General Public License 15 | along with this program. If not, see . 16 | */ 17 | 18 | #include "common.h" 19 | 20 | #include "sx126x.h" 21 | #include "sx126x_hal.h" 22 | 23 | void hexdump(const uint8_t *buf, size_t len) { 24 | uint8_t cbuf_raw[21] = {0}; 25 | cbuf_raw[0] = ' '; 26 | cbuf_raw[1] = '|'; 27 | cbuf_raw[18] = '|'; 28 | cbuf_raw[19] = '\n'; 29 | 30 | uint8_t* cbuf = &cbuf_raw[2]; 31 | 32 | uint8_t last_mod = 0; 33 | 34 | for (size_t i=0; i 5 | * 6 | * This program is free software; you can redistribute it and/or 7 | * modify it under the terms of the GNU General Public License as 8 | * published by the Free Software Foundation; either version 3 of 9 | * the License, or (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program; if not, write to the Free Software 18 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, 19 | * MA 02111-1307 USA 20 | */ 21 | 22 | #include "common.h" 23 | 24 | #include "sx126x.h" 25 | #include "sx126x_hal.h" 26 | 27 | #include 28 | 29 | void hexdump(const uint8_t *buf, size_t len) { 30 | uint8_t cbuf[10] = {0}; 31 | cbuf[8] = '\n'; 32 | 33 | uint8_t last_mod = 0; 34 | 35 | for (size_t i=0; i 0) { 366 | pthread_mutex_lock(&lock); 367 | Lora_SendPkt(buf, len); 368 | pthread_mutex_unlock(&lock); 369 | } 370 | } 371 | return 0; 372 | } 373 | -------------------------------------------------------------------------------- /Software/sources/lora/sx126x_hal.c: -------------------------------------------------------------------------------- 1 | #include "common.h" 2 | 3 | typedef enum sx126x_hal_status_e 4 | { 5 | SX126X_HAL_STATUS_OK = 0, 6 | SX126X_HAL_STATUS_ERROR = 3, 7 | } sx126x_hal_status_t; 8 | 9 | static int gpfd_nrst = -1, gpfd_busy = -1, gpfd_dio1 = -1, gpfd_dio2 = -1; 10 | static int gpevfd_dio1 = -1, gpevfd_dio2 = -1; 11 | static int epfd = -1; 12 | static pthread_t tid_ev; 13 | static pthread_mutex_t spi_lock = PTHREAD_MUTEX_INITIALIZER; 14 | static void (*isr_funcp)(unsigned int dio1_events, unsigned int dio2_events, unsigned int dio3_events, void *userp) = NULL; 15 | static void *isr_userp = NULL; 16 | 17 | static int gpio_open_one(int chip, int line, uint32_t req_flags, const char *tag) { 18 | char pathbuf[24]; 19 | snprintf(pathbuf, sizeof(pathbuf)-1, "/dev/gpiochip%d", chip); 20 | int fd = open(pathbuf, O_RDWR); 21 | if (fd < 0) { 22 | fprintf(stderr, "failed to open GPIO device `%s': %s\n", pathbuf, strerror(errno)); 23 | abort(); 24 | } 25 | 26 | struct gpiohandle_request gl_req = {0}; 27 | gl_req.lineoffsets[0] = line; 28 | gl_req.default_values[0] = 1; 29 | gl_req.flags = req_flags; 30 | gl_req.lines = 1; 31 | strcpy(gl_req.consumer_label, tag); 32 | 33 | retry_lock: 34 | if (ioctl(fd, GPIO_GET_LINEHANDLE_IOCTL, &gl_req)) { 35 | if (errno == EBUSY) { 36 | goto retry_lock; 37 | } 38 | fprintf(stderr, "failed to request GPIO line %d: %s\n", line, strerror(errno)); 39 | abort(); 40 | } 41 | 42 | close(fd); 43 | 44 | printf("GPIO: %s @ {%d, %d}\n", tag, chip, line); 45 | 46 | return gl_req.fd; 47 | } 48 | 49 | static int gpio_open_one_event(int chip, int line, uint32_t handle_flags, uint32_t event_flags, const char *tag) { 50 | char pathbuf[24]; 51 | snprintf(pathbuf, sizeof(pathbuf)-1, "/dev/gpiochip%d", chip); 52 | int fd = open(pathbuf, O_RDWR); 53 | if (fd < 0) { 54 | fprintf(stderr, "failed to open GPIO device `%s': %s\n", pathbuf, strerror(errno)); 55 | abort(); 56 | } 57 | 58 | struct gpioevent_request gl_req = {0}; 59 | gl_req.lineoffset = line; 60 | gl_req.handleflags = handle_flags; 61 | gl_req.eventflags = event_flags; 62 | strcpy(gl_req.consumer_label, tag); 63 | 64 | retry_lock: 65 | if (ioctl(fd, GPIO_GET_LINEEVENT_IOCTL, &gl_req)) { 66 | if (errno == EBUSY) { 67 | goto retry_lock; 68 | } 69 | fprintf(stderr, "failed to request GPIO event for line %d: %s\n", line, strerror(errno)); 70 | abort(); 71 | } 72 | 73 | close(fd); 74 | 75 | printf("GPIO Event: %s @ {%d, %d}\n", tag, chip, line); 76 | 77 | return gl_req.fd; 78 | } 79 | 80 | static inline uint8_t gpio_read(int fd) { 81 | struct gpiohandle_data data; 82 | 83 | if (ioctl(fd, GPIOHANDLE_GET_LINE_VALUES_IOCTL, &data)) { 84 | perror("failed to read value from line"); 85 | abort(); 86 | } 87 | 88 | return data.values[0]; 89 | } 90 | 91 | static inline void gpio_write(int fd, uint8_t val) { 92 | struct gpiohandle_data data; 93 | data.values[0] = val; 94 | 95 | if (ioctl(fd, GPIOHANDLE_SET_LINE_VALUES_IOCTL, &data)) { 96 | perror("failed to write value to line"); 97 | abort(); 98 | } 99 | } 100 | 101 | void sx126x_hal_linux_gpio_init(int reset_gpio[2], int busy_gpio[2], int dio1_gpio[2], int dio2_gpio[2]) { 102 | gpfd_nrst = gpio_open_one(reset_gpio[0], reset_gpio[1], GPIOHANDLE_REQUEST_OUTPUT, "SX126x NRST"); 103 | gpfd_busy = gpio_open_one(busy_gpio[0], busy_gpio[1], GPIOHANDLE_REQUEST_INPUT, "SX126x BUSY"); 104 | // gpfd_dio1 = gpio_open_one(dio1_gpio[0], dio1_gpio[1], GPIOHANDLE_REQUEST_INPUT, "SX126x DIO1"); 105 | // gpfd_dio2 = gpio_open_one(dio2_gpio[0], dio2_gpio[1], GPIOHANDLE_REQUEST_INPUT, "SX126x DIO2"); 106 | 107 | gpevfd_dio1 = gpio_open_one_event(dio1_gpio[0], dio1_gpio[1], GPIOHANDLE_REQUEST_INPUT, GPIOEVENT_REQUEST_RISING_EDGE, "SX126x DIO1"); 108 | gpevfd_dio2 = gpio_open_one_event(dio2_gpio[0], dio2_gpio[1], GPIOHANDLE_REQUEST_INPUT, GPIOEVENT_REQUEST_RISING_EDGE, "SX126x DIO2"); 109 | } 110 | 111 | 112 | 113 | static int spifd = -1; 114 | static struct spi_ioc_transfer spi_tr; 115 | 116 | void sx126x_hal_linux_spi_init(const char *dev_path) { 117 | int fd = open(dev_path, O_RDWR); 118 | if (fd < 0) { 119 | fprintf(stderr, "failed to open SPI device `%s': %s\n", dev_path, strerror(errno)); 120 | abort(); 121 | } 122 | 123 | int spi_mode = SPI_MODE_0; 124 | if (ioctl(fd, SPI_IOC_WR_MODE32, &spi_mode) < 0) { 125 | fprintf(stderr, "failed to set SPI mode 0x%02x: %s\n", spi_mode, strerror(errno)); 126 | abort(); 127 | } 128 | 129 | int spi_speed = 8000000; 130 | if (ioctl(fd, SPI_IOC_WR_MAX_SPEED_HZ, &spi_speed) < 0) { 131 | fprintf(stderr, "failed to set SPI speed to %d: %s\n", spi_speed, strerror(errno)); 132 | abort(); 133 | } 134 | 135 | spifd = fd; 136 | 137 | printf("SPI: %s @ %d Hz\n", dev_path, spi_speed); 138 | } 139 | 140 | static inline void wait_busy() { 141 | while (gpio_read(gpfd_busy) == 1) { 142 | sched_yield(); 143 | } 144 | } 145 | 146 | static void *event_thread(void *userp) { 147 | struct epoll_event evs[2]; 148 | 149 | while (1) { 150 | unsigned int dio_events[3] = {0, 0, 0}; 151 | int rc_ep = epoll_wait(epfd, evs, 2, 5000); 152 | 153 | if (rc_ep > 0) { 154 | for (int i=0; i 45 | #include 46 | 47 | /* 48 | * ----------------------------------------------------------------------------- 49 | * --- PUBLIC MACROS ----------------------------------------------------------- 50 | */ 51 | 52 | /* 53 | * ----------------------------------------------------------------------------- 54 | * --- PUBLIC CONSTANTS -------------------------------------------------------- 55 | */ 56 | 57 | /* 58 | * ----------------------------------------------------------------------------- 59 | * --- PUBLIC TYPES ------------------------------------------------------------ 60 | */ 61 | 62 | typedef enum sx126x_hal_status_e 63 | { 64 | SX126X_HAL_STATUS_OK = 0, 65 | SX126X_HAL_STATUS_ERROR = 3, 66 | } sx126x_hal_status_t; 67 | 68 | /* 69 | * ----------------------------------------------------------------------------- 70 | * --- PUBLIC FUNCTIONS PROTOTYPES --------------------------------------------- 71 | */ 72 | 73 | extern void sx126x_hal_linux_init(const char *spidev_path, int reset_gpio[2], int busy_gpio[2], int dio1_gpio[2], int dio2_gpio[2]); 74 | extern void sx126x_hal_linux_set_interrupt_handler(void (*funcp)(unsigned int, unsigned int, unsigned int, void *), void *userp); 75 | 76 | /** 77 | * Radio data transfer - write 78 | * 79 | * @remark Shall be implemented by the user 80 | * 81 | * @param [in] context Radio implementation parameters 82 | * @param [in] command Pointer to the buffer to be transmitted 83 | * @param [in] command_length Buffer size to be transmitted 84 | * @param [in] data Pointer to the buffer to be transmitted 85 | * @param [in] data_length Buffer size to be transmitted 86 | * 87 | * @returns Operation status 88 | */ 89 | sx126x_hal_status_t sx126x_hal_write( const void* context, const uint8_t* command, const uint16_t command_length, 90 | const uint8_t* data, const uint16_t data_length ); 91 | 92 | /** 93 | * Radio data transfer - read 94 | * 95 | * @remark Shall be implemented by the user 96 | * 97 | * @param [in] context Radio implementation parameters 98 | * @param [in] command Pointer to the buffer to be transmitted 99 | * @param [in] command_length Buffer size to be transmitted 100 | * @param [in] data Pointer to the buffer to be received 101 | * @param [in] data_length Buffer size to be received 102 | * 103 | * @returns Operation status 104 | */ 105 | sx126x_hal_status_t sx126x_hal_read( const void* context, const uint8_t* command, const uint16_t command_length, 106 | uint8_t* data, const uint16_t data_length ); 107 | 108 | /** 109 | * Reset the radio 110 | * 111 | * @remark Shall be implemented by the user 112 | * 113 | * @param [in] context Radio implementation parameters 114 | * 115 | * @returns Operation status 116 | */ 117 | sx126x_hal_status_t sx126x_hal_reset( const void* context ); 118 | 119 | /** 120 | * Wake the radio up. 121 | * 122 | * @remark Shall be implemented by the user 123 | * 124 | * @param [in] context Radio implementation parameters 125 | * 126 | * @returns Operation status 127 | */ 128 | sx126x_hal_status_t sx126x_hal_wakeup( const void* context ); 129 | 130 | #ifdef __cplusplus 131 | } 132 | #endif 133 | 134 | #endif // SX126X_HAL_H 135 | 136 | /* --- EOF ------------------------------------------------------------------ */ 137 | -------------------------------------------------------------------------------- /Software/sources/lora/sx126x_regs.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file sx126x_regs.h 3 | * 4 | * @brief SX126x register definitions 5 | * 6 | * Revised BSD License 7 | * Copyright Semtech Corporation 2020. All rights reserved. 8 | * 9 | * Redistribution and use in source and binary forms, with or without 10 | * modification, are permitted provided that the following conditions are met: 11 | * * Redistributions of source code must retain the above copyright 12 | * notice, this list of conditions and the following disclaimer. 13 | * * Redistributions in binary form must reproduce the above copyright 14 | * notice, this list of conditions and the following disclaimer in the 15 | * documentation and/or other materials provided with the distribution. 16 | * * Neither the name of the Semtech corporation nor the 17 | * names of its contributors may be used to endorse or promote products 18 | * derived from this software without specific prior written permission. 19 | * 20 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 21 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 22 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 23 | * ARE DISCLAIMED. IN NO EVENT SHALL SEMTECH CORPORATION BE LIABLE FOR ANY 24 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 25 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 26 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 27 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 28 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 29 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | */ 31 | 32 | #ifndef SX126X_REGS_H 33 | #define SX126X_REGS_H 34 | 35 | /* 36 | * ----------------------------------------------------------------------------- 37 | * --- DEPENDENCIES ------------------------------------------------------------ 38 | */ 39 | 40 | /* 41 | * ----------------------------------------------------------------------------- 42 | * --- PUBLIC MACROS ----------------------------------------------------------- 43 | */ 44 | 45 | /* 46 | * ----------------------------------------------------------------------------- 47 | * --- PUBLIC CONSTANTS -------------------------------------------------------- 48 | */ 49 | 50 | /** 51 | * @brief The address of the register holding the first byte defining the CRC seed 52 | */ 53 | #define SX126X_REG_CRCSEEDBASEADDRESS 0x06BC 54 | 55 | /** 56 | * @brief The address of the register holding the first byte defining the CRC polynomial 57 | */ 58 | #define SX126X_REG_CRCPOLYBASEADDRESS 0x06BE 59 | 60 | /** 61 | * @brief The address of the register holding the first byte defining the whitening seed 62 | */ 63 | #define SX126X_REG_WHITSEEDBASEADDRESS 0x06B8 64 | 65 | /** 66 | * @brief The address of the register holding the packet configuration 67 | */ 68 | #define SX126X_REG_PKTPARAMS 0x0704 69 | 70 | /** 71 | * @brief The addresses of the registers holding SyncWords values 72 | */ 73 | #define SX126X_REG_SYNCWORDBASEADDRESS 0x06C0 74 | 75 | /** 76 | * @brief The addresses of the register holding LoRa Modem SyncWord value 77 | * 0x1424: LoRaWAN private network, 78 | * 0x3444: LoRaWAN public network 79 | */ 80 | #define SX126X_REG_LR_SYNCWORD 0x0740 81 | 82 | /*! 83 | * The address of the register giving a 32-bit random number 84 | */ 85 | #define SX126X_REG_RNGBASEADDRESS 0x0819 86 | 87 | /*! 88 | * The address of the register used to disable the LNA 89 | */ 90 | #define SX126X_REG_ANA_LNA 0x08E2 91 | 92 | /*! 93 | * The address of the register used to disable the mixer 94 | */ 95 | #define SX126X_REG_ANA_MIXER 0x08E5 96 | 97 | /*! 98 | * The address of the register holding RX Gain value 99 | * 0x94: power saving, 100 | * 0x96: rx boosted 101 | */ 102 | #define SX126X_REG_RXGAIN 0x08AC 103 | 104 | /** 105 | * @brief Change the value on the device internal trimming capacitor 106 | */ 107 | #define SX126X_REG_XTATRIM 0x0911 108 | 109 | /** 110 | * @brief Set the current max value in the over current protection 111 | */ 112 | #define SX126X_REG_OCP 0x08E7 113 | 114 | /** 115 | * @brief WORKAROUND - Optimizing the Inverted IQ Operation, see DS_SX1261-2_V1.2 datasheet chapter 15.4 116 | */ 117 | #define SX126X_REG_IRQ_POLARITY 0x0736 118 | 119 | /** 120 | * @brief WORKAROUND - Modulation Quality with 500 kHz LoRa Bandwidth, see DS_SX1261-2_V1.2 datasheet chapter 15.1 121 | */ 122 | #define SX126X_REG_TX_MODULATION 0x0889 123 | 124 | /** 125 | * @brief WORKAROUND - Better resistance to antenna mismatch, see DS_SX1261-2_V1.2 datasheet chapter 15.2 126 | */ 127 | #define SX126X_REG_TX_CLAMP_CFG 0x08D8 128 | #define SX126X_REG_TX_CLAMP_CFG_POS ( 1U ) 129 | #define SX126X_REG_TX_CLAMP_CFG_MASK ( 0x0FUL << SX126X_REG_TX_CLAMP_CFG_POS ) 130 | 131 | /** 132 | * @brief RTC control 133 | */ 134 | #define SX126X_REG_RTC_CTRL 0x0902 135 | 136 | /** 137 | * @brief Event clear 138 | */ 139 | #define SX126X_REG_EVT_CLR 0x0944 140 | #define SX126X_REG_EVT_CLR_TIMEOUT_POS ( 1U ) 141 | #define SX126X_REG_EVT_CLR_TIMEOUT_MASK ( 0x01UL << SX126X_REG_EVT_CLR_TIMEOUT_POS ) 142 | 143 | /** 144 | * @brief RX address pointer 145 | */ 146 | #define SX126X_REG_RX_ADDRESS_POINTER 0x0803 147 | 148 | /** 149 | * @brief RX/TX payload length 150 | */ 151 | #define SX126X_REG_RXTX_PAYLOAD_LEN 0x06BB 152 | 153 | /** 154 | * @brief Output disable 155 | */ 156 | #define SX126X_REG_OUT_DIS_REG 0x0580 157 | #define SX126X_REG_OUT_DIS_REG_DIO3_POS ( 3U ) 158 | #define SX126X_REG_OUT_DIS_REG_DIO3_MASK ( 0x01UL << SX126X_REG_OUT_DIS_REG_DIO3_POS ) 159 | 160 | /** 161 | * @brief Input enable 162 | */ 163 | #define SX126X_REG_IN_EN_REG 0x0583 164 | #define SX126X_REG_IN_EN_REG_DIO3_POS ( 3U ) 165 | #define SX126X_REG_IN_EN_REG_DIO3_MASK ( 0x01UL << SX126X_REG_IN_EN_REG_DIO3_POS ) 166 | 167 | /** 168 | * @brief TX bitbang A 169 | */ 170 | #define SX126X_REG_BITBANG_A_REG 0x0680 171 | #define SX126X_REG_BITBANG_A_REG_ENABLE_POS ( 4U ) 172 | #define SX126X_REG_BITBANG_A_REG_ENABLE_MASK ( 0x07UL << SX126X_REG_BITBANG_A_REG_ENABLE_POS ) 173 | #define SX126X_REG_BITBANG_A_REG_ENABLE_VAL ( 0x01UL << SX126X_REG_BITBANG_A_REG_ENABLE_POS ) 174 | 175 | /** 176 | * @brief TX bitbang B 177 | */ 178 | #define SX126X_REG_BITBANG_B_REG 0x0587 179 | #define SX126X_REG_BITBANG_B_REG_ENABLE_POS ( 0U ) 180 | #define SX126X_REG_BITBANG_B_REG_ENABLE_MASK ( 0x0FUL << SX126X_REG_BITBANG_B_REG_ENABLE_POS ) 181 | #define SX126X_REG_BITBANG_B_REG_ENABLE_VAL ( 0x0CUL << SX126X_REG_BITBANG_B_REG_ENABLE_POS ) 182 | 183 | /** 184 | * @brief Number of symbols given as SX126X_REG_LR_SYNCH_TIMEOUT[7:3] * 2 ^ (2*SX126X_REG_LR_SYNCH_TIMEOUT[2:0] + 1) 185 | */ 186 | #define SX126X_REG_LR_SYNCH_TIMEOUT 0x0706 187 | 188 | /* 189 | * ----------------------------------------------------------------------------- 190 | * --- PUBLIC TYPES ------------------------------------------------------------ 191 | */ 192 | 193 | /* 194 | * ----------------------------------------------------------------------------- 195 | * --- PUBLIC FUNCTIONS PROTOTYPES --------------------------------------------- 196 | */ 197 | 198 | #endif // SX126X_REGS_H 199 | 200 | /* --- EOF ------------------------------------------------------------------ */ 201 | -------------------------------------------------------------------------------- /Software/sources/lv_conf.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file lv_conf.h 3 | * Configuration file for v8.2.0 4 | */ 5 | 6 | /* 7 | * Copy this file as `lv_conf.h` 8 | * 1. simply next to the `lvgl` folder 9 | * 2. or any other places and 10 | * - define `LV_CONF_INCLUDE_SIMPLE` 11 | * - add the path as include path 12 | */ 13 | 14 | /* clang-format off */ 15 | #if 1 /*Set it to "1" to enable content*/ 16 | 17 | #ifndef LV_CONF_H 18 | #define LV_CONF_H 19 | 20 | #include 21 | 22 | /*==================== 23 | COLOR SETTINGS 24 | *====================*/ 25 | 26 | /*Color depth: 1 (1 byte per pixel), 8 (RGB332), 16 (RGB565), 32 (ARGB8888)*/ 27 | #define LV_COLOR_DEPTH 16 28 | 29 | /*Swap the 2 bytes of RGB565 color. Useful if the display has an 8-bit interface (e.g. SPI)*/ 30 | #define LV_COLOR_16_SWAP 1 31 | 32 | /*Enable more complex drawing routines to manage screens transparency. 33 | *Can be used if the UI is above another layer, e.g. an OSD menu or video player. 34 | *Requires `LV_COLOR_DEPTH = 32` colors and the screen's `bg_opa` should be set to non LV_OPA_COVER value*/ 35 | #define LV_COLOR_SCREEN_TRANSP 0 36 | 37 | /* Adjust color mix functions rounding. GPUs might calculate color mix (blending) differently. 38 | * 0: round down, 64: round up from x.75, 128: round up from half, 192: round up from x.25, 254: round up */ 39 | #define LV_COLOR_MIX_ROUND_OFS (LV_COLOR_DEPTH == 32 ? 0: 128) 40 | 41 | /*Images pixels with this color will not be drawn if they are chroma keyed)*/ 42 | #define LV_COLOR_CHROMA_KEY lv_color_hex(0x00ff00) /*pure green*/ 43 | 44 | /*========================= 45 | MEMORY SETTINGS 46 | *=========================*/ 47 | 48 | /*1: use custom malloc/free, 0: use the built-in `lv_mem_alloc()` and `lv_mem_free()`*/ 49 | #define LV_MEM_CUSTOM 1 50 | #if LV_MEM_CUSTOM == 0 51 | /*Size of the memory available for `lv_mem_alloc()` in bytes (>= 2kB)*/ 52 | #define LV_MEM_SIZE (128U * 1024U) /*[bytes]*/ 53 | 54 | /*Set an address for the memory pool instead of allocating it as a normal array. Can be in external SRAM too.*/ 55 | #define LV_MEM_ADR 0 /*0: unused*/ 56 | /*Instead of an address give a memory allocator that will be called to get a memory pool for LVGL. E.g. my_malloc*/ 57 | #if LV_MEM_ADR == 0 58 | //#define LV_MEM_POOL_INCLUDE your_alloc_library /* Uncomment if using an external allocator*/ 59 | //#define LV_MEM_POOL_ALLOC your_alloc /* Uncomment if using an external allocator*/ 60 | #endif 61 | 62 | #else /*LV_MEM_CUSTOM*/ 63 | #define LV_MEM_CUSTOM_INCLUDE /*Header for the dynamic memory function*/ 64 | #define LV_MEM_CUSTOM_ALLOC malloc 65 | #define LV_MEM_CUSTOM_FREE free 66 | #define LV_MEM_CUSTOM_REALLOC realloc 67 | #endif /*LV_MEM_CUSTOM*/ 68 | 69 | /*Number of the intermediate memory buffer used during rendering and other internal processing mechanisms. 70 | *You will see an error log message if there wasn't enough buffers. */ 71 | #define LV_MEM_BUF_MAX_NUM 16 72 | 73 | /*Use the standard `memcpy` and `memset` instead of LVGL's own functions. (Might or might not be faster).*/ 74 | #define LV_MEMCPY_MEMSET_STD 0 75 | 76 | /*==================== 77 | HAL SETTINGS 78 | *====================*/ 79 | 80 | /*Default display refresh period. LVG will redraw changed areas with this period time*/ 81 | #define LV_DISP_DEF_REFR_PERIOD 15 /*[ms]*/ 82 | 83 | /*Input device read period in milliseconds*/ 84 | #define LV_INDEV_DEF_READ_PERIOD 15 /*[ms]*/ 85 | 86 | /*Use a custom tick source that tells the elapsed time in milliseconds. 87 | *It removes the need to manually update the tick with `lv_tick_inc()`)*/ 88 | #define LV_TICK_CUSTOM 0 89 | #if LV_TICK_CUSTOM 90 | #define LV_TICK_CUSTOM_INCLUDE "Arduino.h" /*Header for the system time function*/ 91 | #define LV_TICK_CUSTOM_SYS_TIME_EXPR (millis()) /*Expression evaluating to current system time in ms*/ 92 | #endif /*LV_TICK_CUSTOM*/ 93 | 94 | /*Default Dot Per Inch. Used to initialize default sizes such as widgets sized, style paddings. 95 | *(Not so important, you can adjust it to modify default sizes and spaces)*/ 96 | #define LV_DPI_DEF 72 /*[px/inch]*/ 97 | 98 | /*======================= 99 | * FEATURE CONFIGURATION 100 | *=======================*/ 101 | 102 | /*------------- 103 | * Drawing 104 | *-----------*/ 105 | 106 | /*Enable complex draw engine. 107 | *Required to draw shadow, gradient, rounded corners, circles, arc, skew lines, image transformations or any masks*/ 108 | #define LV_DRAW_COMPLEX 1 109 | #if LV_DRAW_COMPLEX != 0 110 | 111 | /*Allow buffering some shadow calculation. 112 | *LV_SHADOW_CACHE_SIZE is the max. shadow size to buffer, where shadow size is `shadow_width + radius` 113 | *Caching has LV_SHADOW_CACHE_SIZE^2 RAM cost*/ 114 | #define LV_SHADOW_CACHE_SIZE 0 115 | 116 | /* Set number of maximally cached circle data. 117 | * The circumference of 1/4 circle are saved for anti-aliasing 118 | * radius * 4 bytes are used per circle (the most often used radiuses are saved) 119 | * 0: to disable caching */ 120 | #define LV_CIRCLE_CACHE_SIZE 4 121 | #endif /*LV_DRAW_COMPLEX*/ 122 | 123 | /*Default image cache size. Image caching keeps the images opened. 124 | *If only the built-in image formats are used there is no real advantage of caching. (I.e. if no new image decoder is added) 125 | *With complex image decoders (e.g. PNG or JPG) caching can save the continuous open/decode of images. 126 | *However the opened images might consume additional RAM. 127 | *0: to disable caching*/ 128 | #define LV_IMG_CACHE_DEF_SIZE 0 129 | 130 | /*Number of stops allowed per gradient. Increase this to allow more stops. 131 | *This adds (sizeof(lv_color_t) + 1) bytes per additional stop*/ 132 | #define LV_GRADIENT_MAX_STOPS 2 133 | 134 | /*Default gradient buffer size. 135 | *When LVGL calculates the gradient "maps" it can save them into a cache to avoid calculating them again. 136 | *LV_GRAD_CACHE_DEF_SIZE sets the size of this cache in bytes. 137 | *If the cache is too small the map will be allocated only while it's required for the drawing. 138 | *0 mean no caching.*/ 139 | #define LV_GRAD_CACHE_DEF_SIZE 0 140 | 141 | /*Allow dithering the gradients (to achieve visual smooth color gradients on limited color depth display) 142 | *LV_DITHER_GRADIENT implies allocating one or two more lines of the object's rendering surface 143 | *The increase in memory consumption is (32 bits * object width) plus 24 bits * object width if using error diffusion */ 144 | #define LV_DITHER_GRADIENT 0 145 | #if LV_DITHER_GRADIENT 146 | /*Add support for error diffusion dithering. 147 | *Error diffusion dithering gets a much better visual result, but implies more CPU consumption and memory when drawing. 148 | *The increase in memory consumption is (24 bits * object's width)*/ 149 | #define LV_DITHER_ERROR_DIFFUSION 0 150 | #endif 151 | 152 | /*Maximum buffer size to allocate for rotation. 153 | *Only used if software rotation is enabled in the display driver.*/ 154 | #define LV_DISP_ROT_MAX_BUF (10*1024) 155 | 156 | /*------------- 157 | * GPU 158 | *-----------*/ 159 | 160 | /*Use STM32's DMA2D (aka Chrom Art) GPU*/ 161 | #define LV_USE_GPU_STM32_DMA2D 0 162 | #if LV_USE_GPU_STM32_DMA2D 163 | /*Must be defined to include path of CMSIS header of target processor 164 | e.g. "stm32f769xx.h" or "stm32f429xx.h"*/ 165 | #define LV_GPU_DMA2D_CMSIS_INCLUDE 166 | #endif 167 | 168 | /*Use NXP's PXP GPU iMX RTxxx platforms*/ 169 | #define LV_USE_GPU_NXP_PXP 0 170 | #if LV_USE_GPU_NXP_PXP 171 | /*1: Add default bare metal and FreeRTOS interrupt handling routines for PXP (lv_gpu_nxp_pxp_osa.c) 172 | * and call lv_gpu_nxp_pxp_init() automatically during lv_init(). Note that symbol SDK_OS_FREE_RTOS 173 | * has to be defined in order to use FreeRTOS OSA, otherwise bare-metal implementation is selected. 174 | *0: lv_gpu_nxp_pxp_init() has to be called manually before lv_init() 175 | */ 176 | #define LV_USE_GPU_NXP_PXP_AUTO_INIT 0 177 | #endif 178 | 179 | /*Use NXP's VG-Lite GPU iMX RTxxx platforms*/ 180 | #define LV_USE_GPU_NXP_VG_LITE 0 181 | 182 | /*Use SDL renderer API*/ 183 | #define LV_USE_GPU_SDL 0 184 | #if LV_USE_GPU_SDL 185 | #define LV_GPU_SDL_INCLUDE_PATH 186 | /*Texture cache size, 8MB by default*/ 187 | #define LV_GPU_SDL_LRU_SIZE (1024 * 1024 * 8) 188 | /*Custom blend mode for mask drawing, disable if you need to link with older SDL2 lib*/ 189 | #define LV_GPU_SDL_CUSTOM_BLEND_MODE (SDL_VERSION_ATLEAST(2, 0, 6)) 190 | #endif 191 | 192 | /*------------- 193 | * Logging 194 | *-----------*/ 195 | 196 | /*Enable the log module*/ 197 | #define LV_USE_LOG 0 198 | #if LV_USE_LOG 199 | 200 | /*How important log should be added: 201 | *LV_LOG_LEVEL_TRACE A lot of logs to give detailed information 202 | *LV_LOG_LEVEL_INFO Log important events 203 | *LV_LOG_LEVEL_WARN Log if something unwanted happened but didn't cause a problem 204 | *LV_LOG_LEVEL_ERROR Only critical issue, when the system may fail 205 | *LV_LOG_LEVEL_USER Only logs added by the user 206 | *LV_LOG_LEVEL_NONE Do not log anything*/ 207 | #define LV_LOG_LEVEL LV_LOG_LEVEL_WARN 208 | 209 | /*1: Print the log with 'printf'; 210 | *0: User need to register a callback with `lv_log_register_print_cb()`*/ 211 | #define LV_LOG_PRINTF 1 212 | 213 | /*Enable/disable LV_LOG_TRACE in modules that produces a huge number of logs*/ 214 | #define LV_LOG_TRACE_MEM 1 215 | #define LV_LOG_TRACE_TIMER 1 216 | #define LV_LOG_TRACE_INDEV 1 217 | #define LV_LOG_TRACE_DISP_REFR 1 218 | #define LV_LOG_TRACE_EVENT 1 219 | #define LV_LOG_TRACE_OBJ_CREATE 1 220 | #define LV_LOG_TRACE_LAYOUT 1 221 | #define LV_LOG_TRACE_ANIM 1 222 | 223 | #endif /*LV_USE_LOG*/ 224 | 225 | /*------------- 226 | * Asserts 227 | *-----------*/ 228 | 229 | /*Enable asserts if an operation is failed or an invalid data is found. 230 | *If LV_USE_LOG is enabled an error message will be printed on failure*/ 231 | #define LV_USE_ASSERT_NULL 0 /*Check if the parameter is NULL. (Very fast, recommended)*/ 232 | #define LV_USE_ASSERT_MALLOC 0 /*Checks is the memory is successfully allocated or no. (Very fast, recommended)*/ 233 | #define LV_USE_ASSERT_STYLE 0 /*Check if the styles are properly initialized. (Very fast, recommended)*/ 234 | #define LV_USE_ASSERT_MEM_INTEGRITY 0 /*Check the integrity of `lv_mem` after critical operations. (Slow)*/ 235 | #define LV_USE_ASSERT_OBJ 0 /*Check the object's type and existence (e.g. not deleted). (Slow)*/ 236 | 237 | /*Add a custom handler when assert happens e.g. to restart the MCU*/ 238 | #define LV_ASSERT_HANDLER_INCLUDE 239 | #define LV_ASSERT_HANDLER while(1); /*Halt by default*/ 240 | 241 | /*------------- 242 | * Others 243 | *-----------*/ 244 | 245 | /*1: Show CPU usage and FPS count*/ 246 | #define LV_USE_PERF_MONITOR 1 247 | #if LV_USE_PERF_MONITOR 248 | #define LV_USE_PERF_MONITOR_POS LV_ALIGN_BOTTOM_RIGHT 249 | #endif 250 | 251 | /*1: Show the used memory and the memory fragmentation 252 | * Requires LV_MEM_CUSTOM = 0*/ 253 | #define LV_USE_MEM_MONITOR 0 254 | #if LV_USE_MEM_MONITOR 255 | #define LV_USE_MEM_MONITOR_POS LV_ALIGN_BOTTOM_LEFT 256 | #endif 257 | 258 | /*1: Draw random colored rectangles over the redrawn areas*/ 259 | #define LV_USE_REFR_DEBUG 0 260 | 261 | /*Change the built in (v)snprintf functions*/ 262 | #define LV_SPRINTF_CUSTOM 0 263 | #if LV_SPRINTF_CUSTOM 264 | #define LV_SPRINTF_INCLUDE 265 | #define lv_snprintf snprintf 266 | #define lv_vsnprintf vsnprintf 267 | #else /*LV_SPRINTF_CUSTOM*/ 268 | #define LV_SPRINTF_USE_FLOAT 0 269 | #endif /*LV_SPRINTF_CUSTOM*/ 270 | 271 | #define LV_USE_USER_DATA 1 272 | 273 | /*Garbage Collector settings 274 | *Used if lvgl is bound to higher level language and the memory is managed by that language*/ 275 | #define LV_ENABLE_GC 0 276 | #if LV_ENABLE_GC != 0 277 | #define LV_GC_INCLUDE "gc.h" /*Include Garbage Collector related things*/ 278 | #endif /*LV_ENABLE_GC*/ 279 | 280 | /*===================== 281 | * COMPILER SETTINGS 282 | *====================*/ 283 | 284 | /*For big endian systems set to 1*/ 285 | #define LV_BIG_ENDIAN_SYSTEM 0 286 | 287 | /*Define a custom attribute to `lv_tick_inc` function*/ 288 | #define LV_ATTRIBUTE_TICK_INC 289 | 290 | /*Define a custom attribute to `lv_timer_handler` function*/ 291 | #define LV_ATTRIBUTE_TIMER_HANDLER 292 | 293 | /*Define a custom attribute to `lv_disp_flush_ready` function*/ 294 | #define LV_ATTRIBUTE_FLUSH_READY 295 | 296 | /*Required alignment size for buffers*/ 297 | #define LV_ATTRIBUTE_MEM_ALIGN_SIZE 4 298 | 299 | /*Will be added where memories needs to be aligned (with -Os data might not be aligned to boundary by default). 300 | * E.g. __attribute__((aligned(4)))*/ 301 | #define LV_ATTRIBUTE_MEM_ALIGN __attribute__((aligned(4))) 302 | 303 | /*Attribute to mark large constant arrays for example font's bitmaps*/ 304 | #define LV_ATTRIBUTE_LARGE_CONST 305 | 306 | /*Compiler prefix for a big array declaration in RAM*/ 307 | #define LV_ATTRIBUTE_LARGE_RAM_ARRAY 308 | 309 | /*Place performance critical functions into a faster memory (e.g RAM)*/ 310 | #define LV_ATTRIBUTE_FAST_MEM 311 | 312 | /*Prefix variables that are used in GPU accelerated operations, often these need to be placed in RAM sections that are DMA accessible*/ 313 | #define LV_ATTRIBUTE_DMA 314 | 315 | /*Export integer constant to binding. This macro is used with constants in the form of LV_ that 316 | *should also appear on LVGL binding API such as Micropython.*/ 317 | #define LV_EXPORT_CONST_INT(int_value) struct _silence_gcc_warning /*The default value just prevents GCC warning*/ 318 | 319 | /*Extend the default -32k..32k coordinate range to -4M..4M by using int32_t for coordinates instead of int16_t*/ 320 | #define LV_USE_LARGE_COORD 0 321 | 322 | /*================== 323 | * FONT USAGE 324 | *===================*/ 325 | 326 | /*Montserrat fonts with ASCII range and some symbols using bpp = 4 327 | *https://fonts.google.com/specimen/Montserrat*/ 328 | #define LV_FONT_MONTSERRAT_8 0 329 | #define LV_FONT_MONTSERRAT_10 0 330 | #define LV_FONT_MONTSERRAT_12 1 331 | #define LV_FONT_MONTSERRAT_14 1 332 | #define LV_FONT_MONTSERRAT_16 1 333 | #define LV_FONT_MONTSERRAT_18 0 334 | #define LV_FONT_MONTSERRAT_20 0 335 | #define LV_FONT_MONTSERRAT_22 0 336 | #define LV_FONT_MONTSERRAT_24 0 337 | #define LV_FONT_MONTSERRAT_26 0 338 | #define LV_FONT_MONTSERRAT_28 0 339 | #define LV_FONT_MONTSERRAT_30 0 340 | #define LV_FONT_MONTSERRAT_32 0 341 | #define LV_FONT_MONTSERRAT_34 0 342 | #define LV_FONT_MONTSERRAT_36 0 343 | #define LV_FONT_MONTSERRAT_38 0 344 | #define LV_FONT_MONTSERRAT_40 0 345 | #define LV_FONT_MONTSERRAT_42 0 346 | #define LV_FONT_MONTSERRAT_44 0 347 | #define LV_FONT_MONTSERRAT_46 0 348 | #define LV_FONT_MONTSERRAT_48 0 349 | 350 | /*Demonstrate special features*/ 351 | #define LV_FONT_MONTSERRAT_12_SUBPX 0 352 | #define LV_FONT_MONTSERRAT_28_COMPRESSED 0 /*bpp = 3*/ 353 | #define LV_FONT_DEJAVU_16_PERSIAN_HEBREW 0 /*Hebrew, Arabic, Persian letters and all their forms*/ 354 | #define LV_FONT_SIMSUN_16_CJK 0 /*1000 most common CJK radicals*/ 355 | 356 | /*Pixel perfect monospace fonts*/ 357 | #define LV_FONT_UNSCII_8 0 358 | #define LV_FONT_UNSCII_16 0 359 | 360 | /*Optionally declare custom fonts here. 361 | *You can use these fonts as default font too and they will be available globally. 362 | *E.g. #define LV_FONT_CUSTOM_DECLARE LV_FONT_DECLARE(my_font_1) LV_FONT_DECLARE(my_font_2)*/ 363 | #define LV_FONT_CUSTOM_DECLARE 364 | 365 | /*Always set a default font*/ 366 | #define LV_FONT_DEFAULT &lv_font_montserrat_14 367 | 368 | /*Enable handling large font and/or fonts with a lot of characters. 369 | *The limit depends on the font size, font face and bpp. 370 | *Compiler error will be triggered if a font needs it.*/ 371 | #define LV_FONT_FMT_TXT_LARGE 0 372 | 373 | /*Enables/disables support for compressed fonts.*/ 374 | #define LV_USE_FONT_COMPRESSED 0 375 | 376 | /*Enable subpixel rendering*/ 377 | #define LV_USE_FONT_SUBPX 0 378 | #if LV_USE_FONT_SUBPX 379 | /*Set the pixel order of the display. Physical order of RGB channels. Doesn't matter with "normal" fonts.*/ 380 | #define LV_FONT_SUBPX_BGR 0 /*0: RGB; 1:BGR order*/ 381 | #endif 382 | 383 | /*================= 384 | * TEXT SETTINGS 385 | *=================*/ 386 | 387 | /** 388 | * Select a character encoding for strings. 389 | * Your IDE or editor should have the same character encoding 390 | * - LV_TXT_ENC_UTF8 391 | * - LV_TXT_ENC_ASCII 392 | */ 393 | #define LV_TXT_ENC LV_TXT_ENC_UTF8 394 | 395 | /*Can break (wrap) texts on these chars*/ 396 | #define LV_TXT_BREAK_CHARS " ,.;:-_" 397 | 398 | /*If a word is at least this long, will break wherever "prettiest" 399 | *To disable, set to a value <= 0*/ 400 | #define LV_TXT_LINE_BREAK_LONG_LEN 0 401 | 402 | /*Minimum number of characters in a long word to put on a line before a break. 403 | *Depends on LV_TXT_LINE_BREAK_LONG_LEN.*/ 404 | #define LV_TXT_LINE_BREAK_LONG_PRE_MIN_LEN 3 405 | 406 | /*Minimum number of characters in a long word to put on a line after a break. 407 | *Depends on LV_TXT_LINE_BREAK_LONG_LEN.*/ 408 | #define LV_TXT_LINE_BREAK_LONG_POST_MIN_LEN 3 409 | 410 | /*The control character to use for signalling text recoloring.*/ 411 | #define LV_TXT_COLOR_CMD "#" 412 | 413 | /*Support bidirectional texts. Allows mixing Left-to-Right and Right-to-Left texts. 414 | *The direction will be processed according to the Unicode Bidirectional Algorithm: 415 | *https://www.w3.org/International/articles/inline-bidi-markup/uba-basics*/ 416 | #define LV_USE_BIDI 0 417 | #if LV_USE_BIDI 418 | /*Set the default direction. Supported values: 419 | *`LV_BASE_DIR_LTR` Left-to-Right 420 | *`LV_BASE_DIR_RTL` Right-to-Left 421 | *`LV_BASE_DIR_AUTO` detect texts base direction*/ 422 | #define LV_BIDI_BASE_DIR_DEF LV_BASE_DIR_AUTO 423 | #endif 424 | 425 | /*Enable Arabic/Persian processing 426 | *In these languages characters should be replaced with an other form based on their position in the text*/ 427 | #define LV_USE_ARABIC_PERSIAN_CHARS 0 428 | 429 | /*================== 430 | * WIDGET USAGE 431 | *================*/ 432 | 433 | /*Documentation of the widgets: https://docs.lvgl.io/latest/en/html/widgets/index.html*/ 434 | 435 | #define LV_USE_ARC 1 436 | 437 | #define LV_USE_ANIMIMG 1 438 | 439 | #define LV_USE_BAR 1 440 | 441 | #define LV_USE_BTN 1 442 | 443 | #define LV_USE_BTNMATRIX 1 444 | 445 | #define LV_USE_CANVAS 1 446 | 447 | #define LV_USE_CHECKBOX 1 448 | 449 | #define LV_USE_DROPDOWN 1 /*Requires: lv_label*/ 450 | 451 | #define LV_USE_IMG 1 /*Requires: lv_label*/ 452 | 453 | #define LV_USE_LABEL 1 454 | #if LV_USE_LABEL 455 | #define LV_LABEL_TEXT_SELECTION 1 /*Enable selecting text of the label*/ 456 | #define LV_LABEL_LONG_TXT_HINT 1 /*Store some extra info in labels to speed up drawing of very long texts*/ 457 | #endif 458 | 459 | #define LV_USE_LINE 1 460 | 461 | #define LV_USE_ROLLER 1 /*Requires: lv_label*/ 462 | #if LV_USE_ROLLER 463 | #define LV_ROLLER_INF_PAGES 7 /*Number of extra "pages" when the roller is infinite*/ 464 | #endif 465 | 466 | #define LV_USE_SLIDER 1 /*Requires: lv_bar*/ 467 | 468 | #define LV_USE_SWITCH 1 469 | 470 | #define LV_USE_TEXTAREA 1 /*Requires: lv_label*/ 471 | #if LV_USE_TEXTAREA != 0 472 | #define LV_TEXTAREA_DEF_PWD_SHOW_TIME 1500 /*ms*/ 473 | #endif 474 | 475 | #define LV_USE_TABLE 1 476 | 477 | /*================== 478 | * EXTRA COMPONENTS 479 | *==================*/ 480 | 481 | /*----------- 482 | * Widgets 483 | *----------*/ 484 | #define LV_USE_CALENDAR 1 485 | #if LV_USE_CALENDAR 486 | #define LV_CALENDAR_WEEK_STARTS_MONDAY 0 487 | #if LV_CALENDAR_WEEK_STARTS_MONDAY 488 | #define LV_CALENDAR_DEFAULT_DAY_NAMES {"Mo", "Tu", "We", "Th", "Fr", "Sa", "Su"} 489 | #else 490 | #define LV_CALENDAR_DEFAULT_DAY_NAMES {"Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"} 491 | #endif 492 | 493 | #define LV_CALENDAR_DEFAULT_MONTH_NAMES {"January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"} 494 | #define LV_USE_CALENDAR_HEADER_ARROW 1 495 | #define LV_USE_CALENDAR_HEADER_DROPDOWN 1 496 | #endif /*LV_USE_CALENDAR*/ 497 | 498 | #define LV_USE_CHART 1 499 | 500 | #define LV_USE_COLORWHEEL 1 501 | 502 | #define LV_USE_IMGBTN 1 503 | 504 | #define LV_USE_KEYBOARD 1 505 | 506 | #define LV_USE_LED 1 507 | 508 | #define LV_USE_LIST 1 509 | 510 | #define LV_USE_MENU 1 511 | 512 | #define LV_USE_METER 1 513 | 514 | #define LV_USE_MSGBOX 1 515 | 516 | #define LV_USE_SPINBOX 1 517 | 518 | #define LV_USE_SPINNER 1 519 | 520 | #define LV_USE_TABVIEW 1 521 | 522 | #define LV_USE_TILEVIEW 1 523 | 524 | #define LV_USE_WIN 1 525 | 526 | #define LV_USE_SPAN 1 527 | #if LV_USE_SPAN 528 | /*A line text can contain maximum num of span descriptor */ 529 | #define LV_SPAN_SNIPPET_STACK_SIZE 64 530 | #endif 531 | 532 | /*----------- 533 | * Themes 534 | *----------*/ 535 | 536 | /*A simple, impressive and very complete theme*/ 537 | #define LV_USE_THEME_DEFAULT 1 538 | #if LV_USE_THEME_DEFAULT 539 | 540 | /*0: Light mode; 1: Dark mode*/ 541 | #define LV_THEME_DEFAULT_DARK 0 542 | 543 | /*1: Enable grow on press*/ 544 | #define LV_THEME_DEFAULT_GROW 1 545 | 546 | /*Default transition time in [ms]*/ 547 | #define LV_THEME_DEFAULT_TRANSITION_TIME 80 548 | #endif /*LV_USE_THEME_DEFAULT*/ 549 | 550 | /*A very simple theme that is a good starting point for a custom theme*/ 551 | #define LV_USE_THEME_BASIC 1 552 | 553 | /*A theme designed for monochrome displays*/ 554 | #define LV_USE_THEME_MONO 1 555 | 556 | /*----------- 557 | * Layouts 558 | *----------*/ 559 | 560 | /*A layout similar to Flexbox in CSS.*/ 561 | #define LV_USE_FLEX 1 562 | 563 | /*A layout similar to Grid in CSS.*/ 564 | #define LV_USE_GRID 1 565 | 566 | /*--------------------- 567 | * 3rd party libraries 568 | *--------------------*/ 569 | 570 | /*File system interfaces for common APIs */ 571 | 572 | /*API for fopen, fread, etc*/ 573 | #define LV_USE_FS_STDIO 0 574 | #if LV_USE_FS_STDIO 575 | #define LV_FS_STDIO_LETTER '\0' /*Set an upper cased letter on which the drive will accessible (e.g. 'A')*/ 576 | #define LV_FS_STDIO_PATH "" /*Set the working directory. File/directory paths will be appended to it.*/ 577 | #define LV_FS_STDIO_CACHE_SIZE 0 /*>0 to cache this number of bytes in lv_fs_read()*/ 578 | #endif 579 | 580 | /*API for open, read, etc*/ 581 | #define LV_USE_FS_POSIX 0 582 | #if LV_USE_FS_POSIX 583 | #define LV_FS_POSIX_LETTER '\0' /*Set an upper cased letter on which the drive will accessible (e.g. 'A')*/ 584 | #define LV_FS_POSIX_PATH "" /*Set the working directory. File/directory paths will be appended to it.*/ 585 | #define LV_FS_POSIX_CACHE_SIZE 0 /*>0 to cache this number of bytes in lv_fs_read()*/ 586 | #endif 587 | 588 | /*API for CreateFile, ReadFile, etc*/ 589 | #define LV_USE_FS_WIN32 0 590 | #if LV_USE_FS_WIN32 591 | #define LV_FS_WIN32_LETTER '\0' /*Set an upper cased letter on which the drive will accessible (e.g. 'A')*/ 592 | #define LV_FS_WIN32_PATH "" /*Set the working directory. File/directory paths will be appended to it.*/ 593 | #define LV_FS_WIN32_CACHE_SIZE 0 /*>0 to cache this number of bytes in lv_fs_read()*/ 594 | #endif 595 | 596 | /*API for FATFS (needs to be added separately). Uses f_open, f_read, etc*/ 597 | #define LV_USE_FS_FATFS 0 598 | #if LV_USE_FS_FATFS 599 | #define LV_FS_FATFS_LETTER '\0' /*Set an upper cased letter on which the drive will accessible (e.g. 'A')*/ 600 | #define LV_FS_FATFS_CACHE_SIZE 0 /*>0 to cache this number of bytes in lv_fs_read()*/ 601 | #endif 602 | 603 | /*PNG decoder library*/ 604 | #define LV_USE_PNG 0 605 | 606 | /*BMP decoder library*/ 607 | #define LV_USE_BMP 0 608 | 609 | /* JPG + split JPG decoder library. 610 | * Split JPG is a custom format optimized for embedded systems. */ 611 | #define LV_USE_SJPG 0 612 | 613 | /*GIF decoder library*/ 614 | #define LV_USE_GIF 0 615 | 616 | /*QR code library*/ 617 | #define LV_USE_QRCODE 0 618 | 619 | /*FreeType library*/ 620 | #define LV_USE_FREETYPE 0 621 | #if LV_USE_FREETYPE 622 | /*Memory used by FreeType to cache characters [bytes] (-1: no caching)*/ 623 | #define LV_FREETYPE_CACHE_SIZE (16 * 1024) 624 | #if LV_FREETYPE_CACHE_SIZE >= 0 625 | /* 1: bitmap cache use the sbit cache, 0:bitmap cache use the image cache. */ 626 | /* sbit cache:it is much more memory efficient for small bitmaps(font size < 256) */ 627 | /* if font size >= 256, must be configured as image cache */ 628 | #define LV_FREETYPE_SBIT_CACHE 0 629 | /* Maximum number of opened FT_Face/FT_Size objects managed by this cache instance. */ 630 | /* (0:use system defaults) */ 631 | #define LV_FREETYPE_CACHE_FT_FACES 0 632 | #define LV_FREETYPE_CACHE_FT_SIZES 0 633 | #endif 634 | #endif 635 | 636 | /*Rlottie library*/ 637 | #define LV_USE_RLOTTIE 0 638 | 639 | /*FFmpeg library for image decoding and playing videos 640 | *Supports all major image formats so do not enable other image decoder with it*/ 641 | #define LV_USE_FFMPEG 0 642 | #if LV_USE_FFMPEG 643 | /*Dump input information to stderr*/ 644 | #define LV_FFMPEG_AV_DUMP_FORMAT 0 645 | #endif 646 | 647 | /*----------- 648 | * Others 649 | *----------*/ 650 | 651 | /*1: Enable API to take snapshot for object*/ 652 | #define LV_USE_SNAPSHOT 0 653 | 654 | /*1: Enable Monkey test*/ 655 | #define LV_USE_MONKEY 0 656 | 657 | /*1: Enable grid navigation*/ 658 | #define LV_USE_GRIDNAV 0 659 | 660 | /*================== 661 | * EXAMPLES 662 | *==================*/ 663 | 664 | /*Enable the examples to be built with the library*/ 665 | #define LV_BUILD_EXAMPLES 1 666 | 667 | /*=================== 668 | * DEMO USAGE 669 | ====================*/ 670 | 671 | /*Show some widget. It might be required to increase `LV_MEM_SIZE` */ 672 | #define LV_USE_DEMO_WIDGETS 0 673 | #if LV_USE_DEMO_WIDGETS 674 | #define LV_DEMO_WIDGETS_SLIDESHOW 0 675 | #endif 676 | 677 | /*Demonstrate the usage of encoder and keyboard*/ 678 | #define LV_USE_DEMO_KEYPAD_AND_ENCODER 0 679 | 680 | /*Benchmark your system*/ 681 | #define LV_USE_DEMO_BENCHMARK 0 682 | 683 | /*Stress test for LVGL*/ 684 | #define LV_USE_DEMO_STRESS 1 685 | 686 | /*Music player demo*/ 687 | #define LV_USE_DEMO_MUSIC 1 688 | #if LV_USE_DEMO_MUSIC 689 | # define LV_DEMO_MUSIC_SQUARE 0 690 | # define LV_DEMO_MUSIC_LANDSCAPE 0 691 | # define LV_DEMO_MUSIC_ROUND 0 692 | # define LV_DEMO_MUSIC_LARGE 0 693 | # define LV_DEMO_MUSIC_AUTO_PLAY 1 694 | #endif 695 | 696 | /*--END OF LV_CONF_H--*/ 697 | 698 | #endif /*LV_CONF_H*/ 699 | 700 | #endif /*End of "Content enable"*/ 701 | -------------------------------------------------------------------------------- /Software/sources/lvgl_demo.c: -------------------------------------------------------------------------------- 1 | /* 2 | This file is part of jz-diag-tools. 3 | Copyright (C) 2022 Reimu NotMoe 4 | 5 | This program is free software: you can redistribute it and/or modify 6 | it under the terms of the GNU Affero General Public License as 7 | published by the Free Software Foundation, either version 3 of the 8 | License, or (at your option) any later version. 9 | 10 | This program is distributed in the hope that it will be useful, 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | GNU Affero General Public License for more details. 14 | 15 | You should have received a copy of the GNU Affero General Public License 16 | along with this program. If not, see . 17 | */ 18 | 19 | #include 20 | #include 21 | #include 22 | #include 23 | #include 24 | #include 25 | #include 26 | #include 27 | #include 28 | 29 | #include 30 | 31 | #include "st7789.h" 32 | 33 | #include 34 | #include 35 | #define PERIPH_BASE 0x10000000 36 | 37 | volatile void *periph_phys = NULL; 38 | 39 | volatile XHAL_GPIO_TypeDef *xhgpioa = NULL; 40 | volatile XHAL_GPIO_TypeDef *xhgpiob = NULL; 41 | 42 | XHAL_SPI_HandleTypeDef xhspi = {0}; 43 | 44 | void my_flush_cb(lv_disp_drv_t * disp_drv, const lv_area_t * area, lv_color_t * color_p) { 45 | // printf("f\n"); 46 | 47 | int xs, ys, xe, ye; 48 | 49 | xs = area->x1 + 8; 50 | ys = area->y1 + 32; 51 | xe = area->x2 + 8; 52 | ye = area->y2 + 32; 53 | 54 | ST7789_DrawImage(xs, ys, xe - xs + 1, ye - ys + 1, (const uint16_t *)color_p); 55 | 56 | /* IMPORTANT!!! 57 | * Inform the graphics library that you are ready with the flushing*/ 58 | lv_disp_flush_ready(disp_drv); 59 | } 60 | 61 | void *tick_thread(void *data) 62 | { 63 | (void)data; 64 | 65 | while (1) { 66 | usleep(5 * 1000); 67 | lv_tick_inc(5); 68 | } 69 | 70 | return 0; 71 | } 72 | 73 | int main(int argc, char **argv) { 74 | if (!argv[1]) { 75 | puts("Usage: lvgl_demo \n" 76 | " m: Music player\n" 77 | " s: Stress test"); 78 | puts("Warning: Unbind FBTFT driver before use."); 79 | exit(1); 80 | } 81 | 82 | int fd = open("/dev/mem", O_RDWR|O_SYNC); 83 | 84 | if (fd < 0) { 85 | perror("error: failed to open /dev/mem"); 86 | return 2; 87 | } 88 | 89 | periph_phys = mmap(NULL, 0x8000000, PROT_READ|PROT_WRITE, MAP_SHARED, fd, PERIPH_BASE); 90 | 91 | volatile uint32_t *reg_cpm_clkgr = periph_phys + 0x20; 92 | 93 | *reg_cpm_clkgr &= ~(1 << 19); 94 | 95 | if (periph_phys == MAP_FAILED) { 96 | perror("error: mmap failed"); 97 | return 2; 98 | } 99 | 100 | puts("mmap done"); 101 | 102 | xhgpioa = periph_phys + (XHAL_PHYSADDR_GPIO - PERIPH_BASE) + XHAL_GPIO_PORT_WIDTH * ('A' - 'A'); 103 | xhgpiob = periph_phys + (XHAL_PHYSADDR_GPIO - PERIPH_BASE) + XHAL_GPIO_PORT_WIDTH * ('B' - 'A'); 104 | 105 | // D_C 106 | XHAL_GPIO_SetAsGPIO(xhgpiob, 7, 0); 107 | puts("pb07 as output"); 108 | 109 | // RST 110 | XHAL_GPIO_SetAsGPIO(xhgpiob, 10, 0); 111 | puts("pb10 as output"); 112 | 113 | memset(&xhspi, 0, sizeof(XHAL_SPI_HandleTypeDef)); 114 | xhspi.periph = periph_phys + (XHAL_PHYSADDR_SPI - PERIPH_BASE); 115 | 116 | XHAL_SPI_Init(&xhspi); 117 | puts("XHAL_SPI_Init, wait"); 118 | 119 | // sleep(1); 120 | // puts("waited"); 121 | 122 | ST7789_Init(); 123 | puts("ST7789_Init"); 124 | 125 | ST7789_Fill_Color(BLACK); 126 | 127 | lv_init(); 128 | 129 | static lv_disp_draw_buf_t disp_buf; 130 | 131 | /*Static or global buffer(s). The second buffer is optional*/ 132 | static lv_color_t buf_1[224 * 280]; 133 | static lv_color_t buf_2[224 * 280]; 134 | 135 | /*Initialize `disp_buf` with the buffer(s). With only one buffer use NULL instead buf_2 */ 136 | lv_disp_draw_buf_init(&disp_buf, buf_1, buf_2, 224 * 280); 137 | 138 | static lv_disp_drv_t disp_drv; /*A variable to hold the drivers. Must be static or global.*/ 139 | lv_disp_drv_init(&disp_drv); /*Basic initialization*/ 140 | disp_drv.draw_buf = &disp_buf; /*Set an initialized buffer*/ 141 | disp_drv.flush_cb = my_flush_cb; /*Set a flush callback to draw to the display*/ 142 | disp_drv.hor_res = 224; /*Set the horizontal resolution in pixels*/ 143 | disp_drv.ver_res = 280; /*Set the vertical resolution in pixels*/ 144 | 145 | lv_disp_t *disp = lv_disp_drv_register(&disp_drv); /*Register the driver and save the created display objects*/ 146 | 147 | if (argv[1][0] == 'm') 148 | lv_demo_music(); 149 | else 150 | lv_demo_stress(); 151 | 152 | pthread_t tid_tick; 153 | pthread_create(&tid_tick, NULL, tick_thread, NULL); 154 | 155 | puts("lvgl init"); 156 | 157 | size_t cccnt = 1; 158 | 159 | while (1) { 160 | lv_task_handler(); 161 | 162 | usleep(7500); 163 | } 164 | } -------------------------------------------------------------------------------- /Software/sources/st7789.c: -------------------------------------------------------------------------------- 1 | #include "st7789.h" 2 | 3 | #include 4 | #include 5 | 6 | 7 | void HAL_Delay(uint32_t ms) { 8 | usleep(ms * 1000); 9 | } 10 | 11 | /** 12 | * @brief Write command to ST7789 controller 13 | * @param cmd -> command to write 14 | * @return none 15 | */ 16 | static void ST7789_WriteCommand(uint8_t cmd) { 17 | ST7789_Select(); 18 | ST7789_DC_Clr(); 19 | 20 | XHAL_SPI_Transmit(&xhspi, &cmd, sizeof(cmd)); 21 | 22 | ST7789_UnSelect(); 23 | } 24 | 25 | /** 26 | * @brief Write data to ST7789 controller 27 | * @param buff -> pointer of data buffer 28 | * @param buff_size -> size of the data buffer 29 | * @return none 30 | */ 31 | static void ST7789_WriteData(uint8_t *buff, size_t buff_size) { 32 | ST7789_Select(); 33 | ST7789_DC_Set(); 34 | 35 | XHAL_SPI_Transmit(&xhspi, buff, buff_size); 36 | 37 | ST7789_UnSelect(); 38 | } 39 | 40 | 41 | /** 42 | * @brief Write data to ST7789 controller, simplify for 8bit data. 43 | * data -> data to write 44 | * @return none 45 | */ 46 | static void ST7789_WriteSmallData(uint8_t data) { 47 | ST7789_Select(); 48 | ST7789_DC_Set(); 49 | XHAL_SPI_Transmit(&xhspi, &data, sizeof(data)); 50 | ST7789_UnSelect(); 51 | } 52 | 53 | /** 54 | * @brief Set the rotation direction of the display 55 | * @param m -> rotation parameter(please refer it in st7789.h) 56 | * @return none 57 | */ 58 | void ST7789_SetRotation(uint8_t m) { 59 | ST7789_WriteCommand(ST7789_MADCTL); // MADCTL 60 | switch (m) { 61 | case 0: 62 | ST7789_WriteSmallData(ST7789_MADCTL_MX | ST7789_MADCTL_MY | ST7789_MADCTL_RGB); 63 | break; 64 | case 1: 65 | ST7789_WriteSmallData(ST7789_MADCTL_MY | ST7789_MADCTL_MV | ST7789_MADCTL_RGB); 66 | break; 67 | case 2: 68 | ST7789_WriteSmallData(ST7789_MADCTL_RGB); 69 | break; 70 | case 3: 71 | ST7789_WriteSmallData(ST7789_MADCTL_MX | ST7789_MADCTL_MV | ST7789_MADCTL_RGB); 72 | break; 73 | default: 74 | break; 75 | } 76 | } 77 | 78 | /** 79 | * @brief Set address of DisplayWindow 80 | * @param xi&yi -> coordinates of window 81 | * @return none 82 | */ 83 | static void ST7789_SetAddressWindow(uint16_t x0, uint16_t y0, uint16_t x1, uint16_t y1) { 84 | uint16_t x_start = x0 + X_SHIFT, x_end = x1 + X_SHIFT; 85 | uint16_t y_start = y0 + Y_SHIFT, y_end = y1 + Y_SHIFT; 86 | 87 | /* Column Address set */ 88 | ST7789_WriteCommand(ST7789_CASET); 89 | { 90 | uint8_t data[] = {x_start >> 8, x_start & 0xFF, x_end >> 8, x_end & 0xFF}; 91 | ST7789_WriteData(data, sizeof(data)); 92 | } 93 | 94 | /* Row Address set */ 95 | ST7789_WriteCommand(ST7789_RASET); 96 | { 97 | uint8_t data[] = {y_start >> 8, y_start & 0xFF, y_end >> 8, y_end & 0xFF}; 98 | ST7789_WriteData(data, sizeof(data)); 99 | } 100 | /* Write to RAM */ 101 | ST7789_WriteCommand(ST7789_RAMWR); 102 | } 103 | 104 | /** 105 | * @brief Initialize ST7789 controller 106 | * @param none 107 | * @return none 108 | */ 109 | void ST7789_Init(void) { 110 | 111 | HAL_Delay(100); 112 | ST7789_RST_Clr(); 113 | HAL_Delay(100); 114 | ST7789_RST_Set(); 115 | HAL_Delay(150); 116 | 117 | ST7789_WriteCommand(ST7789_COLMOD); // Set color mode 118 | ST7789_WriteSmallData(ST7789_COLOR_MODE_16bit); 119 | ST7789_WriteCommand(0xB2); // Porch control 120 | { 121 | uint8_t data[] = {0x0C, 0x0C, 0x00, 0x33, 0x33}; 122 | ST7789_WriteData(data, sizeof(data)); 123 | } 124 | ST7789_SetRotation(ST7789_ROTATION); // MADCTL (Display Rotation) 125 | 126 | /* Internal LCD Voltage generator settings */ 127 | ST7789_WriteCommand(0XB7); // Gate Control 128 | ST7789_WriteSmallData(0x35); // Default value 129 | ST7789_WriteCommand(0xBB); // VCOM setting 130 | ST7789_WriteSmallData(0x19); // 0.725v (default 0.75v for 0x20) 131 | ST7789_WriteCommand(0xC0); // LCMCTRL 132 | ST7789_WriteSmallData(0x2C); // Default value 133 | ST7789_WriteCommand(0xC2); // VDV and VRH command Enable 134 | ST7789_WriteSmallData(0x01); // Default value 135 | ST7789_WriteCommand(0xC3); // VRH set 136 | ST7789_WriteSmallData(0x12); // +-4.45v (defalut +-4.1v for 0x0B) 137 | ST7789_WriteCommand(0xC4); // VDV set 138 | ST7789_WriteSmallData(0x20); // Default value 139 | ST7789_WriteCommand(0xC6); // Frame rate control in normal mode 140 | ST7789_WriteSmallData(0x0F); // Default value (60HZ) 141 | ST7789_WriteCommand(0xD0); // Power control 142 | ST7789_WriteSmallData(0xA4); // Default value 143 | ST7789_WriteSmallData(0xA1); // Default value 144 | /**************** Division line ****************/ 145 | 146 | ST7789_WriteCommand(0xE0); 147 | { 148 | uint8_t data[] = {0xD0, 0x04, 0x0D, 0x11, 0x13, 0x2B, 0x3F, 0x54, 0x4C, 0x18, 0x0D, 0x0B, 0x1F, 0x23}; 149 | ST7789_WriteData(data, sizeof(data)); 150 | } 151 | 152 | ST7789_WriteCommand(0xE1); 153 | { 154 | uint8_t data[] = {0xD0, 0x04, 0x0C, 0x11, 0x13, 0x2C, 0x3F, 0x44, 0x51, 0x2F, 0x1F, 0x1F, 0x20, 0x23}; 155 | ST7789_WriteData(data, sizeof(data)); 156 | } 157 | ST7789_WriteCommand(ST7789_INVON); // Inversion ON 158 | ST7789_WriteCommand(ST7789_SLPOUT); // Out of sleep mode 159 | ST7789_WriteCommand(ST7789_NORON); // Normal Display on 160 | ST7789_WriteCommand(ST7789_DISPON); // Main screen turned on 161 | 162 | HAL_Delay(50); 163 | ST7789_Fill_Color(BLACK); // Fill with Black. 164 | } 165 | 166 | /** 167 | * @brief Fill the DisplayWindow with single color 168 | * @param color -> color to Fill with 169 | * @return none 170 | */ 171 | void ST7789_Fill_Color(uint16_t color) { 172 | uint16_t i, j; 173 | ST7789_SetAddressWindow(0, 0, ST7789_WIDTH - 1, ST7789_HEIGHT - 1); 174 | ST7789_Select(); 175 | for (i = 0; i < ST7789_WIDTH; i++) 176 | for (j = 0; j < ST7789_HEIGHT; j++) { 177 | uint8_t data[] = {color >> 8, color & 0xFF}; 178 | ST7789_WriteData(data, sizeof(data)); 179 | } 180 | ST7789_UnSelect(); 181 | } 182 | 183 | /** 184 | * @brief Draw a Pixel 185 | * @param x&y -> coordinate to Draw 186 | * @param color -> color of the Pixel 187 | * @return none 188 | */ 189 | void ST7789_DrawPixel(uint16_t x, uint16_t y, uint16_t color) { 190 | if ((x < 0) || (x >= ST7789_WIDTH) || 191 | (y < 0) || (y >= ST7789_HEIGHT)) return; 192 | 193 | ST7789_SetAddressWindow(x, y, x, y); 194 | uint8_t data[] = {color >> 8, color & 0xFF}; 195 | ST7789_Select(); 196 | ST7789_WriteData(data, sizeof(data)); 197 | ST7789_UnSelect(); 198 | } 199 | 200 | /** 201 | * @brief Fill an Area with single color 202 | * @param xSta&ySta -> coordinate of the start point 203 | * @param xEnd&yEnd -> coordinate of the end point 204 | * @param color -> color to Fill with 205 | * @return none 206 | */ 207 | void ST7789_Fill(uint16_t xSta, uint16_t ySta, uint16_t xEnd, uint16_t yEnd, uint16_t color) { 208 | if ((xEnd < 0) || (xEnd >= ST7789_WIDTH) || 209 | (yEnd < 0) || (yEnd >= ST7789_HEIGHT)) return; 210 | ST7789_Select(); 211 | uint16_t i, j; 212 | ST7789_SetAddressWindow(xSta, ySta, xEnd, yEnd); 213 | for (i = ySta; i <= yEnd; i++) 214 | for (j = xSta; j <= xEnd; j++) { 215 | uint8_t data[] = {color >> 8, color & 0xFF}; 216 | ST7789_WriteData(data, sizeof(data)); 217 | } 218 | ST7789_UnSelect(); 219 | } 220 | 221 | /** 222 | * @brief Draw a big Pixel at a point 223 | * @param x&y -> coordinate of the point 224 | * @param color -> color of the Pixel 225 | * @return none 226 | */ 227 | void ST7789_DrawPixel_4px(uint16_t x, uint16_t y, uint16_t color) { 228 | if ((x <= 0) || (x > ST7789_WIDTH) || 229 | (y <= 0) || (y > ST7789_HEIGHT)) return; 230 | ST7789_Select(); 231 | ST7789_Fill(x - 1, y - 1, x + 1, y + 1, color); 232 | ST7789_UnSelect(); 233 | } 234 | 235 | /** 236 | * @brief Draw a line with single color 237 | * @param x1&y1 -> coordinate of the start point 238 | * @param x2&y2 -> coordinate of the end point 239 | * @param color -> color of the line to Draw 240 | * @return none 241 | */ 242 | void ST7789_DrawLine(uint16_t x0, uint16_t y0, uint16_t x1, uint16_t y1, 243 | uint16_t color) { 244 | uint16_t swap; 245 | uint16_t steep = ABS(y1 - y0) > ABS(x1 - x0); 246 | if (steep) { 247 | swap = x0; 248 | x0 = y0; 249 | y0 = swap; 250 | 251 | swap = x1; 252 | x1 = y1; 253 | y1 = swap; 254 | //_swap_int16_t(x0, y0); 255 | //_swap_int16_t(x1, y1); 256 | } 257 | 258 | if (x0 > x1) { 259 | swap = x0; 260 | x0 = x1; 261 | x1 = swap; 262 | 263 | swap = y0; 264 | y0 = y1; 265 | y1 = swap; 266 | //_swap_int16_t(x0, x1); 267 | //_swap_int16_t(y0, y1); 268 | } 269 | 270 | int16_t dx, dy; 271 | dx = x1 - x0; 272 | dy = ABS(y1 - y0); 273 | 274 | int16_t err = dx / 2; 275 | int16_t ystep; 276 | 277 | if (y0 < y1) { 278 | ystep = 1; 279 | } else { 280 | ystep = -1; 281 | } 282 | 283 | for (; x0 <= x1; x0++) { 284 | if (steep) { 285 | ST7789_DrawPixel(y0, x0, color); 286 | } else { 287 | ST7789_DrawPixel(x0, y0, color); 288 | } 289 | err -= dy; 290 | if (err < 0) { 291 | y0 += ystep; 292 | err += dx; 293 | } 294 | } 295 | } 296 | 297 | /** 298 | * @brief Draw a Rectangle with single color 299 | * @param xi&yi -> 2 coordinates of 2 top points. 300 | * @param color -> color of the Rectangle line 301 | * @return none 302 | */ 303 | void ST7789_DrawRectangle(uint16_t x1, uint16_t y1, uint16_t x2, uint16_t y2, uint16_t color) { 304 | ST7789_Select(); 305 | ST7789_DrawLine(x1, y1, x2, y1, color); 306 | ST7789_DrawLine(x1, y1, x1, y2, color); 307 | ST7789_DrawLine(x1, y2, x2, y2, color); 308 | ST7789_DrawLine(x2, y1, x2, y2, color); 309 | ST7789_UnSelect(); 310 | } 311 | 312 | /** 313 | * @brief Draw a circle with single color 314 | * @param x0&y0 -> coordinate of circle center 315 | * @param r -> radius of circle 316 | * @param color -> color of circle line 317 | * @return none 318 | */ 319 | void ST7789_DrawCircle(uint16_t x0, uint16_t y0, uint8_t r, uint16_t color) { 320 | int16_t f = 1 - r; 321 | int16_t ddF_x = 1; 322 | int16_t ddF_y = -2 * r; 323 | int16_t x = 0; 324 | int16_t y = r; 325 | 326 | ST7789_Select(); 327 | ST7789_DrawPixel(x0, y0 + r, color); 328 | ST7789_DrawPixel(x0, y0 - r, color); 329 | ST7789_DrawPixel(x0 + r, y0, color); 330 | ST7789_DrawPixel(x0 - r, y0, color); 331 | 332 | while (x < y) { 333 | if (f >= 0) { 334 | y--; 335 | ddF_y += 2; 336 | f += ddF_y; 337 | } 338 | x++; 339 | ddF_x += 2; 340 | f += ddF_x; 341 | 342 | ST7789_DrawPixel(x0 + x, y0 + y, color); 343 | ST7789_DrawPixel(x0 - x, y0 + y, color); 344 | ST7789_DrawPixel(x0 + x, y0 - y, color); 345 | ST7789_DrawPixel(x0 - x, y0 - y, color); 346 | 347 | ST7789_DrawPixel(x0 + y, y0 + x, color); 348 | ST7789_DrawPixel(x0 - y, y0 + x, color); 349 | ST7789_DrawPixel(x0 + y, y0 - x, color); 350 | ST7789_DrawPixel(x0 - y, y0 - x, color); 351 | } 352 | ST7789_UnSelect(); 353 | } 354 | 355 | /** 356 | * @brief Draw an Image on the screen 357 | * @param x&y -> start point of the Image 358 | * @param w&h -> width & height of the Image to Draw 359 | * @param data -> pointer of the Image array 360 | * @return none 361 | */ 362 | void ST7789_DrawImage(uint16_t x, uint16_t y, uint16_t w, uint16_t h, const uint16_t *data) { 363 | if ((x >= ST7789_WIDTH) || (y >= ST7789_HEIGHT)) 364 | return; 365 | if ((x + w - 1) >= ST7789_WIDTH) 366 | return; 367 | if ((y + h - 1) >= ST7789_HEIGHT) 368 | return; 369 | 370 | ST7789_Select(); 371 | ST7789_SetAddressWindow(x, y, x + w - 1, y + h - 1); 372 | ST7789_WriteData((uint8_t *) data, sizeof(uint16_t) * w * h); 373 | ST7789_UnSelect(); 374 | } 375 | 376 | void ST7789_DrawImage_DMA(uint16_t x, uint16_t y, uint16_t w, uint16_t h, const uint16_t *data) { 377 | if ((x >= ST7789_WIDTH) || (y >= ST7789_HEIGHT)) 378 | return; 379 | if ((x + w - 1) >= ST7789_WIDTH) 380 | return; 381 | if ((y + h - 1) >= ST7789_HEIGHT) 382 | return; 383 | 384 | ST7789_Select(); 385 | ST7789_SetAddressWindow(x, y, x + w - 1, y + h - 1); 386 | ST7789_WriteData((uint8_t *) data, sizeof(uint16_t) * w * h); 387 | ST7789_UnSelect(); 388 | } 389 | 390 | /** 391 | * @brief Invert Fullscreen color 392 | * @param invert -> Whether to invert 393 | * @return none 394 | */ 395 | void ST7789_InvertColors(uint8_t invert) { 396 | ST7789_Select(); 397 | ST7789_WriteCommand(invert ? 0x21 /* INVON */ : 0x20 /* INVOFF */); 398 | ST7789_UnSelect(); 399 | } 400 | 401 | /** 402 | * @brief Write a char 403 | * @param x&y -> cursor of the start point. 404 | * @param ch -> char to write 405 | * @param font -> fontstyle of the string 406 | * @param color -> color of the char 407 | * @param bgcolor -> background color of the char 408 | * @return none 409 | */ 410 | void ST7789_WriteChar(uint16_t x, uint16_t y, char ch, FontDef font, uint16_t color, uint16_t bgcolor) { 411 | uint32_t i, b, j; 412 | ST7789_Select(); 413 | ST7789_SetAddressWindow(x, y, x + font.width - 1, y + font.height - 1); 414 | 415 | for (i = 0; i < font.height; i++) { 416 | b = font.data[(ch - 32) * font.height + i]; 417 | for (j = 0; j < font.width; j++) { 418 | if ((b << j) & 0x8000) { 419 | uint8_t data[] = {color >> 8, color & 0xFF}; 420 | ST7789_WriteData(data, sizeof(data)); 421 | } else { 422 | uint8_t data[] = {bgcolor >> 8, bgcolor & 0xFF}; 423 | ST7789_WriteData(data, sizeof(data)); 424 | } 425 | } 426 | } 427 | ST7789_UnSelect(); 428 | } 429 | 430 | /** 431 | * @brief Write a string 432 | * @param x&y -> cursor of the start point. 433 | * @param str -> string to write 434 | * @param font -> fontstyle of the string 435 | * @param color -> color of the string 436 | * @param bgcolor -> background color of the string 437 | * @return none 438 | */ 439 | void ST7789_WriteString(uint16_t x, uint16_t y, const char *str, FontDef font, uint16_t color, uint16_t bgcolor) { 440 | ST7789_Select(); 441 | while (*str) { 442 | if (x + font.width >= ST7789_WIDTH) { 443 | x = 0; 444 | y += font.height; 445 | if (y + font.height >= ST7789_HEIGHT) { 446 | break; 447 | } 448 | 449 | if (*str == ' ') { 450 | // skip spaces in the beginning of the new line 451 | str++; 452 | continue; 453 | } 454 | } 455 | ST7789_WriteChar(x, y, *str, font, color, bgcolor); 456 | x += font.width; 457 | str++; 458 | } 459 | ST7789_UnSelect(); 460 | } 461 | 462 | /** 463 | * @brief Draw a filled Rectangle with single color 464 | * @param x&y -> coordinates of the starting point 465 | * @param w&h -> width & height of the Rectangle 466 | * @param color -> color of the Rectangle 467 | * @return none 468 | */ 469 | void ST7789_DrawFilledRectangle(uint16_t x, uint16_t y, uint16_t w, uint16_t h, uint16_t color) { 470 | ST7789_Select(); 471 | uint8_t i; 472 | 473 | /* Check input parameters */ 474 | if (x >= ST7789_WIDTH || 475 | y >= ST7789_HEIGHT) { 476 | /* Return error */ 477 | return; 478 | } 479 | 480 | /* Check width and height */ 481 | if ((x + w) >= ST7789_WIDTH) { 482 | w = ST7789_WIDTH - x; 483 | } 484 | if ((y + h) >= ST7789_HEIGHT) { 485 | h = ST7789_HEIGHT - y; 486 | } 487 | 488 | /* Draw lines */ 489 | for (i = 0; i <= h; i++) { 490 | /* Draw lines */ 491 | ST7789_DrawLine(x, y + i, x + w, y + i, color); 492 | } 493 | ST7789_UnSelect(); 494 | } 495 | 496 | /** 497 | * @brief Draw a Triangle with single color 498 | * @param xi&yi -> 3 coordinates of 3 top points. 499 | * @param color ->color of the lines 500 | * @return none 501 | */ 502 | void ST7789_DrawTriangle(uint16_t x1, uint16_t y1, uint16_t x2, uint16_t y2, uint16_t x3, uint16_t y3, uint16_t color) { 503 | ST7789_Select(); 504 | /* Draw lines */ 505 | ST7789_DrawLine(x1, y1, x2, y2, color); 506 | ST7789_DrawLine(x2, y2, x3, y3, color); 507 | ST7789_DrawLine(x3, y3, x1, y1, color); 508 | ST7789_UnSelect(); 509 | } 510 | 511 | /** 512 | * @brief Draw a filled Triangle with single color 513 | * @param xi&yi -> 3 coordinates of 3 top points. 514 | * @param color ->color of the triangle 515 | * @return none 516 | */ 517 | void ST7789_DrawFilledTriangle(uint16_t x1, uint16_t y1, uint16_t x2, uint16_t y2, uint16_t x3, uint16_t y3, uint16_t color) { 518 | ST7789_Select(); 519 | int16_t deltax = 0, deltay = 0, x = 0, y = 0, xinc1 = 0, xinc2 = 0, 520 | yinc1 = 0, yinc2 = 0, den = 0, num = 0, numadd = 0, numpixels = 0, 521 | curpixel = 0; 522 | 523 | deltax = ABS(x2 - x1); 524 | deltay = ABS(y2 - y1); 525 | x = x1; 526 | y = y1; 527 | 528 | if (x2 >= x1) { 529 | xinc1 = 1; 530 | xinc2 = 1; 531 | } else { 532 | xinc1 = -1; 533 | xinc2 = -1; 534 | } 535 | 536 | if (y2 >= y1) { 537 | yinc1 = 1; 538 | yinc2 = 1; 539 | } else { 540 | yinc1 = -1; 541 | yinc2 = -1; 542 | } 543 | 544 | if (deltax >= deltay) { 545 | xinc1 = 0; 546 | yinc2 = 0; 547 | den = deltax; 548 | num = deltax / 2; 549 | numadd = deltay; 550 | numpixels = deltax; 551 | } else { 552 | xinc2 = 0; 553 | yinc1 = 0; 554 | den = deltay; 555 | num = deltay / 2; 556 | numadd = deltax; 557 | numpixels = deltay; 558 | } 559 | 560 | for (curpixel = 0; curpixel <= numpixels; curpixel++) { 561 | ST7789_DrawLine(x, y, x3, y3, color); 562 | 563 | num += numadd; 564 | if (num >= den) { 565 | num -= den; 566 | x += xinc1; 567 | y += yinc1; 568 | } 569 | x += xinc2; 570 | y += yinc2; 571 | } 572 | ST7789_UnSelect(); 573 | } 574 | 575 | /** 576 | * @brief Draw a Filled circle with single color 577 | * @param x0&y0 -> coordinate of circle center 578 | * @param r -> radius of circle 579 | * @param color -> color of circle 580 | * @return none 581 | */ 582 | void ST7789_DrawFilledCircle(int16_t x0, int16_t y0, int16_t r, uint16_t color) { 583 | ST7789_Select(); 584 | int16_t f = 1 - r; 585 | int16_t ddF_x = 1; 586 | int16_t ddF_y = -2 * r; 587 | int16_t x = 0; 588 | int16_t y = r; 589 | 590 | ST7789_DrawPixel(x0, y0 + r, color); 591 | ST7789_DrawPixel(x0, y0 - r, color); 592 | ST7789_DrawPixel(x0 + r, y0, color); 593 | ST7789_DrawPixel(x0 - r, y0, color); 594 | ST7789_DrawLine(x0 - r, y0, x0 + r, y0, color); 595 | 596 | while (x < y) { 597 | if (f >= 0) { 598 | y--; 599 | ddF_y += 2; 600 | f += ddF_y; 601 | } 602 | x++; 603 | ddF_x += 2; 604 | f += ddF_x; 605 | 606 | ST7789_DrawLine(x0 - x, y0 + y, x0 + x, y0 + y, color); 607 | ST7789_DrawLine(x0 + x, y0 - y, x0 - x, y0 - y, color); 608 | 609 | ST7789_DrawLine(x0 + y, y0 + x, x0 - y, y0 + x, color); 610 | ST7789_DrawLine(x0 + y, y0 - x, x0 - y, y0 - x, color); 611 | } 612 | ST7789_UnSelect(); 613 | } 614 | 615 | /** 616 | * @brief Open/Close tearing effect line 617 | * @param tear -> Whether to tear 618 | * @return none 619 | */ 620 | void ST7789_TearEffect(uint8_t tear) { 621 | ST7789_Select(); 622 | ST7789_WriteCommand(tear ? 0x35 /* TEON */ : 0x34 /* TEOFF */); 623 | ST7789_UnSelect(); 624 | } 625 | 626 | /** 627 | * @brief A Simple test function for ST7789 628 | * @param none 629 | * @return none 630 | */ 631 | void ST7789_Test(void) { 632 | ST7789_Fill_Color(WHITE); 633 | HAL_Delay(1000); 634 | ST7789_WriteString(10, 20, "Speed Test", Font_11x18, RED, WHITE); 635 | HAL_Delay(1000); 636 | ST7789_Fill_Color(CYAN); 637 | // HAL_Delay(500); 638 | ST7789_Fill_Color(RED); 639 | // HAL_Delay(500); 640 | ST7789_Fill_Color(BLUE); 641 | // HAL_Delay(500); 642 | ST7789_Fill_Color(GREEN); 643 | // HAL_Delay(500); 644 | ST7789_Fill_Color(YELLOW); 645 | // HAL_Delay(500); 646 | ST7789_Fill_Color(BROWN); 647 | // HAL_Delay(500); 648 | ST7789_Fill_Color(DARKBLUE); 649 | // HAL_Delay(500); 650 | ST7789_Fill_Color(MAGENTA); 651 | HAL_Delay(500); 652 | ST7789_Fill_Color(LIGHTGREEN); 653 | HAL_Delay(500); 654 | ST7789_Fill_Color(LGRAY); 655 | HAL_Delay(500); 656 | ST7789_Fill_Color(LBBLUE); 657 | HAL_Delay(500); 658 | ST7789_Fill_Color(WHITE); 659 | HAL_Delay(500); 660 | 661 | ST7789_WriteString(10, 10, "Font test.", Font_16x26, GBLUE, WHITE); 662 | ST7789_WriteString(10, 50, "Hello Steve!", Font_7x10, RED, WHITE); 663 | ST7789_WriteString(10, 75, "Hello Steve!", Font_11x18, YELLOW, WHITE); 664 | ST7789_WriteString(10, 100, "Hello Steve!", Font_16x26, MAGENTA, WHITE); 665 | HAL_Delay(1000); 666 | 667 | ST7789_Fill_Color(RED); 668 | ST7789_WriteString(10, 10, "Rect./Line.", Font_11x18, YELLOW, RED); 669 | ST7789_DrawRectangle(30, 30, 100, 100, WHITE); 670 | HAL_Delay(1000); 671 | 672 | ST7789_Fill_Color(RED); 673 | ST7789_WriteString(10, 10, "Filled Rect.", Font_11x18, YELLOW, RED); 674 | ST7789_DrawFilledRectangle(30, 30, 50, 50, WHITE); 675 | HAL_Delay(1000); 676 | 677 | 678 | ST7789_Fill_Color(RED); 679 | ST7789_WriteString(10, 10, "Circle.", Font_11x18, YELLOW, RED); 680 | ST7789_DrawCircle(60, 60, 25, WHITE); 681 | HAL_Delay(1000); 682 | 683 | ST7789_Fill_Color(RED); 684 | ST7789_WriteString(10, 10, "Filled Cir.", Font_11x18, YELLOW, RED); 685 | ST7789_DrawFilledCircle(60, 60, 25, WHITE); 686 | HAL_Delay(1000); 687 | 688 | ST7789_Fill_Color(RED); 689 | ST7789_WriteString(10, 10, "Triangle", Font_11x18, YELLOW, RED); 690 | ST7789_DrawTriangle(30, 30, 30, 70, 60, 40, WHITE); 691 | HAL_Delay(1000); 692 | 693 | ST7789_Fill_Color(RED); 694 | ST7789_WriteString(10, 10, "Filled Tri", Font_11x18, YELLOW, RED); 695 | ST7789_DrawFilledTriangle(30, 30, 30, 70, 60, 40, WHITE); 696 | HAL_Delay(1000); 697 | 698 | // If FLASH cannot storage anymore datas, please delete codes below. 699 | ST7789_Fill_Color(WHITE); 700 | ST7789_DrawImage(0, 0, 128, 128, (uint16_t *) saber); 701 | HAL_Delay(3000); 702 | } 703 | -------------------------------------------------------------------------------- /Software/sources/st7789.h: -------------------------------------------------------------------------------- 1 | #ifndef __ST7789_H 2 | #define __ST7789_H 3 | 4 | /* choose a Hardware SPI port to use. */ 5 | #include "fonts.h" 6 | 7 | #include 8 | 9 | extern XHAL_SPI_HandleTypeDef xhspi; 10 | extern volatile XHAL_GPIO_TypeDef *xhgpioa; 11 | extern volatile XHAL_GPIO_TypeDef *xhgpiob; 12 | 13 | /* Pin connection*/ 14 | 15 | #define ST7789_RST_PIN LATBbits.LATB13 16 | 17 | #define ST7789_DC_PIN LATBbits.LATB12 18 | 19 | #define ST7789_CS_PIN LATBbits.LATB15 20 | 21 | /***** Use if need backlight control ***** 22 | #define BLK_PORT 23 | #define BLK_PIN 24 | ******************************************/ 25 | 26 | /** 27 | * Comment one to use another one. 28 | * two parameters can be choosed 29 | * 135x240(0.96 inch) and 240x240(1.3inch) 30 | * X_SHIFT&Y_SHIFT are used to correct different display's resolution 31 | */ 32 | 33 | /* Choose a type you are using */ 34 | //#define USING_135X240 35 | #define USING_240X320 36 | 37 | /* Choose a display rotation you want to use: (0-3) */ 38 | #define ST7789_ROTATION 0 39 | //#define ST7789_ROTATION 1 40 | //#define ST7789_ROTATION 3 // use Normally on 240x240 41 | //#define ST7789_ROTATION 3 42 | 43 | #ifdef USING_135X240 44 | 45 | #if ST7789_ROTATION == 0 46 | #define ST7789_WIDTH 135 47 | #define ST7789_HEIGHT 240 48 | #define X_SHIFT 53 49 | #define Y_SHIFT 40 50 | #endif 51 | 52 | #if ST7789_ROTATION == 1 53 | #define ST7789_WIDTH 240 54 | #define ST7789_HEIGHT 135 55 | #define X_SHIFT 40 56 | #define Y_SHIFT 52 57 | #endif 58 | 59 | #if ST7789_ROTATION == 2 60 | #define ST7789_WIDTH 135 61 | #define ST7789_HEIGHT 240 62 | #define X_SHIFT 52 63 | #define Y_SHIFT 40 64 | #endif 65 | 66 | #if ST7789_ROTATION == 3 67 | #define ST7789_WIDTH 240 68 | #define ST7789_HEIGHT 135 69 | #define X_SHIFT 40 70 | #define Y_SHIFT 53 71 | #endif 72 | 73 | #endif 74 | 75 | #ifdef USING_240X240 76 | 77 | #define ST7789_WIDTH 240 78 | #define ST7789_HEIGHT 240 79 | 80 | #if ST7789_ROTATION == 0 81 | #define X_SHIFT 0 82 | #define Y_SHIFT 80 83 | #elif ST7789_ROTATION == 1 84 | #define X_SHIFT 80 85 | #define Y_SHIFT 0 86 | #elif ST7789_ROTATION == 2 87 | #define X_SHIFT 0 88 | #define Y_SHIFT 0 89 | #elif ST7789_ROTATION == 3 90 | #define X_SHIFT 0 91 | #define Y_SHIFT 0 92 | #endif 93 | 94 | #endif 95 | 96 | #ifdef USING_240X320 97 | 98 | #define ST7789_WIDTH 240 99 | #define ST7789_HEIGHT 320 100 | 101 | #if ST7789_ROTATION == 0 102 | #define X_SHIFT 0 103 | #define Y_SHIFT 0 104 | #elif ST7789_ROTATION == 1 105 | #define X_SHIFT 80 106 | #define Y_SHIFT 0 107 | #elif ST7789_ROTATION == 2 108 | #define X_SHIFT 0 109 | #define Y_SHIFT 0 110 | #elif ST7789_ROTATION == 3 111 | #define X_SHIFT 0 112 | #define Y_SHIFT 0 113 | #endif 114 | 115 | #endif 116 | 117 | /** 118 | *Color of pen 119 | *If you want to use another color, you can choose one in RGB565 format. 120 | */ 121 | 122 | #define WHITE 0xFFFF 123 | #define BLACK 0x0000 124 | #define BLUE 0x001F 125 | #define RED 0xF800 126 | #define MAGENTA 0xF81F 127 | #define GREEN 0x07E0 128 | #define CYAN 0x7FFF 129 | #define YELLOW 0xFFE0 130 | #define GRAY 0X8430 131 | #define BRED 0XF81F 132 | #define GRED 0XFFE0 133 | #define GBLUE 0X07FF 134 | #define BROWN 0XBC40 135 | #define BRRED 0XFC07 136 | #define DARKBLUE 0X01CF 137 | #define LIGHTBLUE 0X7D7C 138 | #define GRAYBLUE 0X5458 139 | 140 | #define LIGHTGREEN 0X841F 141 | #define LGRAY 0XC618 142 | #define LGRAYBLUE 0XA651 143 | #define LBBLUE 0X2B12 144 | 145 | /* Control Registers and constant codes */ 146 | #define ST7789_NOP 0x00 147 | #define ST7789_SWRESET 0x01 148 | #define ST7789_RDDID 0x04 149 | #define ST7789_RDDST 0x09 150 | 151 | #define ST7789_SLPIN 0x10 152 | #define ST7789_SLPOUT 0x11 153 | #define ST7789_PTLON 0x12 154 | #define ST7789_NORON 0x13 155 | 156 | #define ST7789_INVOFF 0x20 157 | #define ST7789_INVON 0x21 158 | #define ST7789_DISPOFF 0x28 159 | #define ST7789_DISPON 0x29 160 | #define ST7789_CASET 0x2A 161 | #define ST7789_RASET 0x2B 162 | #define ST7789_RAMWR 0x2C 163 | #define ST7789_RAMRD 0x2E 164 | 165 | #define ST7789_PTLAR 0x30 166 | #define ST7789_COLMOD 0x3A 167 | #define ST7789_MADCTL 0x36 168 | 169 | /** 170 | * Memory Data Access Control Register (0x36H) 171 | * MAP: D7 D6 D5 D4 D3 D2 D1 D0 172 | * param: MY MX MV ML RGB MH - - 173 | * 174 | */ 175 | 176 | /* Page Address Order ('0': Top to Bottom, '1': the opposite) */ 177 | #define ST7789_MADCTL_MY 0x80 178 | /* Column Address Order ('0': Left to Right, '1': the opposite) */ 179 | #define ST7789_MADCTL_MX 0x40 180 | /* Page/Column Order ('0' = Normal Mode, '1' = Reverse Mode) */ 181 | #define ST7789_MADCTL_MV 0x20 182 | /* Line Address Order ('0' = LCD Refresh Top to Bottom, '1' = the opposite) */ 183 | #define ST7789_MADCTL_ML 0x10 184 | /* RGB/BGR Order ('0' = RGB, '1' = BGR) */ 185 | #define ST7789_MADCTL_RGB 0x00 186 | 187 | #define ST7789_RDID1 0xDA 188 | #define ST7789_RDID2 0xDB 189 | #define ST7789_RDID3 0xDC 190 | #define ST7789_RDID4 0xDD 191 | 192 | /* Advanced options */ 193 | /** 194 | * Caution: Do not operate these settings 195 | * You know what you are doing 196 | */ 197 | 198 | #define ST7789_COLOR_MODE_16bit 0x55 // RGB565 (16bit) 199 | #define ST7789_COLOR_MODE_18bit 0x66 // RGB666 (18bit) 200 | 201 | /* Basic operations */ 202 | #define ST7789_RST_Clr() {XHAL_GPIO_WritePin(xhgpiob, 10, 0);} 203 | #define ST7789_RST_Set() {XHAL_GPIO_WritePin(xhgpiob, 10, 1);} 204 | 205 | #define ST7789_DC_Clr() {XHAL_GPIO_WritePin(xhgpiob, 7, 0);} 206 | #define ST7789_DC_Set() {XHAL_GPIO_WritePin(xhgpiob, 7, 1);} 207 | 208 | #define ST7789_Select() 209 | #define ST7789_UnSelect() 210 | 211 | #define ABS(x) ((x) > 0 ? (x) : -(x)) 212 | 213 | /* Basic functions. */ 214 | void ST7789_Init(void); 215 | void ST7789_SetRotation(uint8_t m); 216 | void ST7789_Fill_Color(uint16_t color); 217 | void ST7789_DrawPixel(uint16_t x, uint16_t y, uint16_t color); 218 | void ST7789_Fill(uint16_t xSta, uint16_t ySta, uint16_t xEnd, uint16_t yEnd, uint16_t color); 219 | void ST7789_DrawPixel_4px(uint16_t x, uint16_t y, uint16_t color); 220 | 221 | /* Graphical functions. */ 222 | void ST7789_DrawLine(uint16_t x1, uint16_t y1, uint16_t x2, uint16_t y2, uint16_t color); 223 | void ST7789_DrawRectangle(uint16_t x1, uint16_t y1, uint16_t x2, uint16_t y2, uint16_t color); 224 | void ST7789_DrawCircle(uint16_t x0, uint16_t y0, uint8_t r, uint16_t color); 225 | void ST7789_DrawImage(uint16_t x, uint16_t y, uint16_t w, uint16_t h, const uint16_t *data); 226 | void ST7789_InvertColors(uint8_t invert); 227 | 228 | void ST7789_DrawImage_DMA(uint16_t x, uint16_t y, uint16_t w, uint16_t h, const uint16_t *data); 229 | 230 | 231 | /* Text functions. */ 232 | void ST7789_WriteChar(uint16_t x, uint16_t y, char ch, FontDef font, uint16_t color, uint16_t bgcolor); 233 | void ST7789_WriteString(uint16_t x, uint16_t y, const char *str, FontDef font, uint16_t color, uint16_t bgcolor); 234 | 235 | /* Extented Graphical functions. */ 236 | void ST7789_DrawFilledRectangle(uint16_t x, uint16_t y, uint16_t w, uint16_t h, uint16_t color); 237 | void ST7789_DrawTriangle(uint16_t x1, uint16_t y1, uint16_t x2, uint16_t y2, uint16_t x3, uint16_t y3, uint16_t color); 238 | void ST7789_DrawFilledTriangle(uint16_t x1, uint16_t y1, uint16_t x2, uint16_t y2, uint16_t x3, uint16_t y3, uint16_t color); 239 | void ST7789_DrawFilledCircle(int16_t x0, int16_t y0, int16_t r, uint16_t color); 240 | 241 | /* Command functions */ 242 | void ST7789_TearEffect(uint8_t tear); 243 | 244 | /* Simple test function. */ 245 | void ST7789_Test(void); 246 | 247 | //#if !defined(USING_240X240) 248 | // #if !defined(USING_135X240) 249 | // #error You should at least choose one display resolution! 250 | // #endif 251 | //#endif 252 | // 253 | //#if !defined(USING_135X240) 254 | // #if !defined(USING_240X240) 255 | // #error You should at least choose one display resolution! 256 | // #endif 257 | //#endif 258 | 259 | 260 | #ifndef ST7789_ROTATION 261 | #error You should at least choose a display rotation! 262 | #endif 263 | 264 | #endif -------------------------------------------------------------------------------- /Software/sources/t9uinput/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.23) 2 | project(t9uinput) 3 | 4 | set(CMAKE_CXX_STANDARD 17) 5 | 6 | add_executable(t9uinput main.cpp) 7 | -------------------------------------------------------------------------------- /Software/sources/t9uinput/main.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | This file is part of t9uinput. 3 | Copyright (C) 2022 Reimu NotMoe 4 | 5 | This program is free software: you can redistribute it and/or modify 6 | it under the terms of the GNU Affero General Public License as 7 | published by the Free Software Foundation, either version 3 of the 8 | License, or (at your option) any later version. 9 | 10 | This program is distributed in the hope that it will be useful, 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | GNU Affero General Public License for more details. 14 | 15 | You should have received a copy of the GNU Affero General Public License 16 | along with this program. If not, see . 17 | */ 18 | 19 | #include 20 | #include 21 | #include 22 | #include 23 | #include 24 | #include 25 | 26 | #include 27 | #include 28 | #include 29 | #include 30 | #include 31 | #include 32 | #include 33 | 34 | #include 35 | #include 36 | 37 | #include 38 | #include 39 | 40 | #include 41 | #include 42 | 43 | #define SAMEKEY_DURATION_MS 500 44 | 45 | auto ts_keypress = std::chrono::steady_clock::now(); 46 | 47 | struct key_def { 48 | const char *name = "ERROR"; 49 | std::vector keycodes{}; 50 | std::vector input_events{}; 51 | }; 52 | 53 | std::unordered_map> key_mapping; 54 | 55 | int fd_ev = -1, fd_ui = -1; 56 | 57 | static void uinput_setup(int fd) { 58 | static const int ev_list[] = {EV_KEY, EV_REL}; 59 | 60 | for (int i=0; i(ts_keypress_new - ts_keypress).count(); 213 | 214 | std::swap(ts_keypress_new, ts_keypress); 215 | 216 | return diff; 217 | } 218 | 219 | void prompt(key_def *kdef) { 220 | size_t kn_len = strlen(kdef->name); 221 | char buf[128]; 222 | 223 | int blen = sprintf(buf, "\033[%zuD", kn_len); 224 | 225 | write(STDOUT_FILENO, kdef->name, kn_len); 226 | write(STDOUT_FILENO, buf, blen); 227 | } 228 | 229 | void prompt_clear(key_def *kdef) { 230 | size_t kn_len = strlen(kdef->name); 231 | char buf[128]; 232 | 233 | int blen = sprintf(buf, "\033[%zuD", kn_len); 234 | 235 | for (size_t i=0; iname); 244 | 245 | prompt_clear(kdef); 246 | 247 | const input_event evs = { 248 | .type = EV_SYN, 249 | .code = SYN_REPORT, 250 | .value = 0 251 | }; 252 | 253 | input_event ev = { 254 | .type = EV_KEY 255 | }; 256 | 257 | 258 | for (auto &it: kdef->keycodes) { 259 | uint16_t sleep_time1 = (it >> 16) & 0xff; 260 | uint16_t sleep_time2 = (it >> 24) & 0xff; 261 | 262 | ev.code = it & 0xffff; 263 | ev.value = 1; 264 | write(fd_ui, &ev, sizeof(ev)); 265 | write(fd_ui, &evs, sizeof(evs)); 266 | 267 | if (sleep_time1) { 268 | usleep(1000 * sleep_time1); 269 | } 270 | 271 | ev.value = 0; 272 | write(fd_ui, &ev, sizeof(ev)); 273 | write(fd_ui, &evs, sizeof(evs)); 274 | 275 | if (sleep_time2) { 276 | usleep(1000 * sleep_time2); 277 | } 278 | } 279 | 280 | for (auto &it: kdef->input_events) { 281 | if (it.type == 0xffff) { 282 | usleep(it.value); 283 | } else { 284 | // printf("-- t: %u, c: %u, v: %d\n", it.type, it.code, it.value); 285 | write(fd_ui, &it, sizeof(it)); 286 | } 287 | } 288 | 289 | sched_yield(); 290 | 291 | } 292 | 293 | int main(int argc, char **argv) { 294 | 295 | if (argc != 3) { 296 | puts("Usage: t9uinput "); 297 | exit(1); 298 | } 299 | 300 | sleep(1); 301 | 302 | fd_ev = open(argv[1], O_RDWR); 303 | assert(fd_ev > 0); 304 | 305 | fd_ui = open("/dev/uinput", O_RDWR); 306 | assert(fd_ui > 0); 307 | 308 | uinput_setup(fd_ui); 309 | 310 | struct pollfd pfds[1]; 311 | 312 | pfds[0].fd = fd_ev; 313 | pfds[0].events = POLLIN; 314 | 315 | input_event cur_iev{}; 316 | 317 | // bool keypress_inpr = false; 318 | uint16_t selected_key = 0; 319 | size_t selected_key_subkey_index = 0; 320 | key_def *selected_key_subkey = nullptr; 321 | 322 | init_key_mappings(); 323 | 324 | if (strtol(argv[2], nullptr, 10)) { 325 | ioctl(fd_ev, EVIOCGRAB, (void *) 1); 326 | } 327 | 328 | while (1) { 329 | int poll_timeout = SAMEKEY_DURATION_MS; 330 | int ret = poll(pfds, 1, poll_timeout); 331 | 332 | if (ret > 0) { 333 | if (pfds[0].revents & POLLIN) { 334 | read(fd_ev, &cur_iev, sizeof(cur_iev)); 335 | 336 | auto it_km = key_mapping.find(cur_iev.code); 337 | 338 | if (it_km == key_mapping.end()) { 339 | write(fd_ui, &cur_iev, sizeof(cur_iev)); 340 | } else { 341 | auto &target_key_kc_list = it_km->second; 342 | 343 | // printf("t: %u, c: %u, v: %d\n", cur_iev.type, cur_iev.code, cur_iev.value); 344 | 345 | if (cur_iev.value == 0) { // Release 346 | if (selected_key == cur_iev.code) { 347 | selected_key_subkey_index++; 348 | selected_key_subkey_index %= target_key_kc_list.size(); 349 | } else { 350 | if (selected_key) { 351 | emit(selected_key_subkey); 352 | } 353 | selected_key_subkey_index = 0; 354 | selected_key = cur_iev.code; 355 | } 356 | 357 | selected_key_subkey = &target_key_kc_list[selected_key_subkey_index]; 358 | 359 | prompt(selected_key_subkey); 360 | 361 | // printf("cur kckm: %u[%zu] -> \"%s\"\n", selected_key, selected_key_subkey_index, selected_key_subkey->name); 362 | } 363 | 364 | } 365 | 366 | } 367 | 368 | } else if (ret == 0) { 369 | if (selected_key) { 370 | emit(selected_key_subkey); 371 | 372 | selected_key = 0; 373 | selected_key_subkey_index = 0; 374 | selected_key_subkey = nullptr; 375 | } 376 | } else { 377 | puts("putain!"); 378 | } 379 | } 380 | 381 | return 0; 382 | } 383 | --------------------------------------------------------------------------------