1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
|
#include <stdbool.h>
//Address is = 16 Bit : 4bit_base , 3bit_fpga_base , 9bit_Address (Word1OrByte2)
//Base Address 0X000
#define BASE 0x00 << 12
#define FPGA1_BASE (BASE | (0x00 << 0x09))
#define FPGA2_BASE (BASE | (0x01 << 0x09))
#define FPGA3_BASE (BASE | (0x02 << 0x09))
//TODO update the addresses Word1OrByte2 !!!
#define Word1OrByte2 0x01//0x01 for Word, 0x02 for Byte
//Registers definitions
// * * * * * * * * * * * * * * * * FPGA 1 * * * * * * * * * * * * * * * * //
//Version1
#define F1_Ver1_D (*((volatile short *)(FPGA1_BASE | (0x0 * Word1OrByte2)))) //Version of Fpga is held here
//Version2
#define F1_Ver2_D (*((volatile short *)(FPGA1_BASE | (0x8 * Word1OrByte2)))) //Version of Fpga is held here
//GPI shorterrupt LS_01 Registers
#define F1_GPI_LS1_D (*((volatile short *)(FPGA1_BASE | (0x10 * Word1OrByte2)))) //Reads the direct values that are currently being sent to the fpga.
#define F1_GPI_LS1_L (*((volatile short *)(FPGA1_BASE | (0x11 * Word1OrByte2)))) //Value of the latched shorterrupts that have occurred
#define F1_GPI_LS1_M (*((volatile short *)(FPGA1_BASE | (0x12 * Word1OrByte2)))) //Value of the shorterrupt mask, Default is 0x0000
//GPI shorterrupt LS_02 Registers
#define F1_GPI_LS2_D (*((volatile short *)(FPGA1_BASE | (0x18 * Word1OrByte2)))) //Reads the direct values that are currently being sent to the fpga.
#define F1_GPI_LS2_L (*((volatile short *)(FPGA1_BASE | (0x19 * Word1OrByte2)))) //Value of the latched shorterrupts that have occurred
#define F1_GPI_LS2_M (*((volatile short *)(FPGA1_BASE | (0x1a * Word1OrByte2)))) //Value of the shorterrupt mask, Default is 0x0000
//GPI shorterrupt LS_03 Registers
#define F1_GPI_LS3_D (*((volatile short *)(FPGA1_BASE | (0x20 * Word1OrByte2)))) //Reads the direct values that are currently being sent to the fpga.
#define F1_GPI_LS3_L (*((volatile short *)(FPGA1_BASE | (0x21 * Word1OrByte2)))) //Value of the latched shorterrupts that have occurred
#define F1_GPI_LS3_M (*((volatile short *)(FPGA1_BASE | (0x22 * Word1OrByte2)))) //Value of the shorterrupt mask, Default is 0x0000
//Moto_Driver_NBUSY_register1
#define F1_Moto_Driver_NBUSY1_D (*((volatile short *)(FPGA1_BASE | (0x28 * Word1OrByte2)))) //Reads the direct values that are currently being sent to the fpga.
#define F1_Moto_Driver_NBUSY1_L (*((volatile short *)(FPGA1_BASE | (0x29 * Word1OrByte2)))) //Value of the latched shorterrupts that have occurred
#define F1_Moto_Driver_NBUSY1_M (*((volatile short *)(FPGA1_BASE | (0x2a * Word1OrByte2)))) //Value of the shorterrupt mask, Default is 0x0000
//Moto_Driver_NBUSY_register2
#define F1_Moto_Driver_NBUSY2_D (*((volatile short *)(FPGA1_BASE | (0x30 * Word1OrByte2)))) //Reads the direct values that are currently being sent to the fpga.
#define F1_Moto_Driver_NBUSY2_L (*((volatile short *)(FPGA1_BASE | (0x31 * Word1OrByte2)))) //Value of the latched shorterrupts that have occurred
#define F1_Moto_Driver_NBUSY2_M (*((volatile short *)(FPGA1_BASE | (0x32 * Word1OrByte2)))) //Value of the shorterrupt mask, Default is 0x0000
//GPI_EXTWINDER_and_TFEED_BRK
#define F1_GPI_EXTWINDER_D (*((volatile short *)(FPGA1_BASE | (0x38 * Word1OrByte2)))) //Reads the direct values that are currently being sent to the fpga.
#define F1_GPI_EXTWINDER_L (*((volatile short *)(FPGA1_BASE | (0x39 * Word1OrByte2)))) //Value of the latched shorterrupts that have occurred
#define F1_GPI_EXTWINDER_M (*((volatile short *)(FPGA1_BASE | (0x3a * Word1OrByte2)))) //Value of the shorterrupt mask, Default is 0x0000
//SPI_Busy_register1
#define F1_SPI_Busy1_D (*((volatile short *)(FPGA1_BASE | (0x048 * Word1OrByte2)))) //Reads the direct values that are currently being sent to the fpga.
#define F1_SPI_Busy1_L (*((volatile short *)(FPGA1_BASE | (0x049 * Word1OrByte2)))) //Value of the latched shorterrupts that have occurred
#define F1_SPI_Busy1_M (*((volatile short *)(FPGA1_BASE | (0x04a * Word1OrByte2)))) //Value of the shorterrupt mask, Default is 0x0000
//SPI_Busy_register2
#define F1_SPI_Busy2_D (*((volatile short *)(FPGA1_BASE | (0x050 * Word1OrByte2)))) //Reads the direct values that are currently being sent to the fpga.
#define F1_SPI_Busy2_L (*((volatile short *)(FPGA1_BASE | (0x051 * Word1OrByte2)))) //Value of the latched shorterrupts that have occurred
#define F1_SPI_Busy2_M (*((volatile short *)(FPGA1_BASE | (0x052 * Word1OrByte2)))) //Value of the shorterrupt mask, Default is 0x0000
//Moto_Driver_NSTBYRST_register1
#define F1_Moto_Driver_NSTBYRST1 (*((volatile short *)(FPGA1_BASE | (0x059 * Word1OrByte2)))) //Writes to values. Readback thevaluessthat are currently in the GPO register
//Moto_Driver_NSTBYRST_register2
#define F1_Moto_Driver_NSTBYRST2 (*((volatile short *)(FPGA1_BASE | (0x061 * Word1OrByte2)))) //Writes to values. Readback thevaluessthat are currently in the GPO register
//Moto_Driver_SW_register1
#define F1_Moto_Driver_SW1 (*((volatile short *)(FPGA1_BASE | (0x069 * Word1OrByte2)))) //Writes to values. Readback thevaluessthat are currently in the GPO register
//Moto_Driver_SW_register2
#define F1_Moto_Driver_SW2 (*((volatile short *)(FPGA1_BASE | (0x071 * Word1OrByte2)))) //Writes to values. Readback thevaluessthat are currently in the GPO register
//QEI_SCREW_ROTENC
#define F1_SCREW_ROTENC_L (*((volatile short *)(FPGA1_BASE | (0x080 * Word1OrByte2)))) //Value of the lsb of the QEI register
#define F1_SCREW_ROTENC_M (*((volatile short *)(FPGA1_BASE | (0x081 * Word1OrByte2)))) //10bits Value of the Msb of the QEI register, 1bit Direction of movement, 5bits Reserved
#define F1_SCREW_ROTENC_I (*((volatile short *)(FPGA1_BASE | (0x082 * Word1OrByte2)))) //value of index counter
//QEI_RSPARE_ROTENC
#define F1_RSPARE_ROTENC_L (*((volatile short *)(FPGA1_BASE | (0x088 * Word1OrByte2)))) //Value of the lsb of the QEI register
#define F1_RSPARE_ROTENC_M (*((volatile short *)(FPGA1_BASE | (0x089 * Word1OrByte2)))) //10bits Value of the Msb of the QEI register, 1bit Direction of movement, 5bits Reserved
#define F1_RSPARE_ROTENC_I (*((volatile short *)(FPGA1_BASE | (0x08a * Word1OrByte2)))) //value of index counter
//QEI_LSPARE1_ROTENC
#define F1_LSPARE1_ROTENC_L (*((volatile short *)(FPGA1_BASE | (0x090 * Word1OrByte2)))) //Value of the lsb of the QEI register
#define F1_LSPARE1_ROTENC_M (*((volatile short *)(FPGA1_BASE | (0x091 * Word1OrByte2)))) //10bits Value of the Msb of the QEI register, 1bit Direction of movement, 5bits Reserved
#define F1_LSPARE1_ROTENC_I (*((volatile short *)(FPGA1_BASE | (0x092 * Word1OrByte2)))) //value of index counter
//QEI_RSPEEDSENS_ROTENC
#define F1_RSPEEDSENS_ROTENC_L (*((volatile short *)(FPGA1_BASE | (0x098 * Word1OrByte2)))) //Value of the lsb of the QEI register
#define F1_RSPEEDSENS_ROTENC_M (*((volatile short *)(FPGA1_BASE | (0x099 * Word1OrByte2)))) //10bits Value of the Msb of the QEI register, 1bit Direction of movement, 5bits Reserved
#define F1_RSPEEDSENS_ROTENC_I (*((volatile short *)(FPGA1_BASE | (0x09a * Word1OrByte2)))) //value of index counter
//QEI_LSPARE2_ROTENC
#define F1_LSPARE2_ROTENC_L (*((volatile short *)(FPGA1_BASE | (0x0A0 * Word1OrByte2)))) //Value of the lsb of the QEI register
#define F1_LSPARE2_ROTENC_M (*((volatile short *)(FPGA1_BASE | (0x0A1 * Word1OrByte2)))) //10bits Value of the Msb of the QEI register, 1bit Direction of movement, 5bits Reserved
#define F1_LSPARE2_ROTENC_I (*((volatile short *)(FPGA1_BASE | (0x0A2 * Word1OrByte2)))) //value of index counter
//QEI_DRYER_LOADARM_ROTENC
#define F1_DRYER_LOADARM_ROTENC_L (*((volatile short *)(FPGA1_BASE | (0x0a8 * Word1OrByte2)))) //Value of the lsb of the QEI register
#define F1_DRYER_LOADARM_ROTENC_M (*((volatile short *)(FPGA1_BASE | (0x0a9 * Word1OrByte2)))) //10bits Value of the Msb of the QEI register, 1bit Direction of movement, 5bits Reserved
#define F1_DRYER_LOADARM_ROTENC_I (*((volatile short *)(FPGA1_BASE | (0x0aa * Word1OrByte2)))) //value of index counter
//SPI_MOTO_RLOADING_A1
#define F1_MOTO_RLOADING_A1_TX_00 (*((volatile short *)(FPGA1_BASE | (0x100 * Word1OrByte2)))) //The second register to be shifted out of the spi. The msb bit of this register is shifted out first.
#define F1_MOTO_RLOADING_A1_TX_01 (*((volatile short *)(FPGA1_BASE | (0x101 * Word1OrByte2)))) //The first register to be shifted out of the spi. The msb bit of this register is shifted out first.
#define F1_MOTO_RLOADING_A1_RX_00 (*((volatile short *)(FPGA1_BASE | (0x102 * Word1OrByte2)))) //The 8 msb bits of the shifted in bits. The 8 msb bits of this register are zeros.
#define F1_MOTO_RLOADING_A1_RX_01 (*((volatile short *)(FPGA1_BASE | (0x103 * Word1OrByte2)))) //The 16 Lsb bits of the shifted in data.
#define F1_MOTO_RLOADING_A1_WORDS (*((volatile short *)(FPGA1_BASE | (0x104 * Word1OrByte2)))) //The amount of spi words (usually byte sized) per transmission.
//SPI_MOTO_RDRIVING_A1
#define F1_MOTO_RDRIVING_A1_TX_00 (*((volatile short *)(FPGA1_BASE | (0x108 * Word1OrByte2)))) //The second register to be shifted out of the spi. The msb bit of this register is shifted out first.
#define F1_MOTO_RDRIVING_A1_TX_01 (*((volatile short *)(FPGA1_BASE | (0x109 * Word1OrByte2)))) //The first register to be shifted out of the spi. The msb bit of this register is shifted out first.
#define F1_MOTO_RDRIVING_A1_RX_00 (*((volatile short *)(FPGA1_BASE | (0x10A * Word1OrByte2)))) //The 8 msb bits of the shifted in bits. The 8 msb bits of this register are zeros.
#define F1_MOTO_RDRIVING_A1_RX_01 (*((volatile short *)(FPGA1_BASE | (0x10B * Word1OrByte2)))) //The 16 Lsb bits of the shifted in data.
#define F1_MOTO_RDRIVING_A1_WORDS (*((volatile short *)(FPGA1_BASE | (0x10C * Word1OrByte2)))) //The amount of spi words (usually byte sized) per transmission.
//SPI_F1_MOTO_LDRIVING_A1
#define F1_MOTO_LDRIVING_A1_TX_00 (*((volatile short *)(FPGA1_BASE | (0x110 * Word1OrByte2)))) //The second register to be shifted out of the spi. The msb bit of this register is shifted out first.
#define F1_MOTO_LDRIVING_A1_TX_01 (*((volatile short *)(FPGA1_BASE | (0x111 * Word1OrByte2)))) //The first register to be shifted out of the spi. The msb bit of this register is shifted out first.
#define F1_MOTO_LDRIVING_A1_RX_00 (*((volatile short *)(FPGA1_BASE | (0x112 * Word1OrByte2)))) //The 8 msb bits of the shifted in bits. The 8 msb bits of this register are zeros.
#define F1_MOTO_LDRIVING_A1_RX_01 (*((volatile short *)(FPGA1_BASE | (0x113 * Word1OrByte2)))) //The 16 Lsb bits of the shifted in data.
#define F1_MOTO_LDRIVING_A1_WORDS (*((volatile short *)(FPGA1_BASE | (0x114 * Word1OrByte2)))) //The amount of spi words (usually byte sized) per transmission.
//SPI_F1_MOTO_LLOADING_A1
#define F1_MOTO_LLOADING_A1_TX_00 (*((volatile short *)(FPGA1_BASE | (0x118 * Word1OrByte2)))) //The second register to be shifted out of the spi. The msb bit of this register is shifted out first.
#define F1_MOTO_LLOADING_A1_TX_01 (*((volatile short *)(FPGA1_BASE | (0x119 * Word1OrByte2)))) //The first register to be shifted out of the spi. The msb bit of this register is shifted out first.
#define F1_MOTO_LLOADING_A1_RX_00 (*((volatile short *)(FPGA1_BASE | (0x11A * Word1OrByte2)))) //The 8 msb bits of the shifted in bits. The 8 msb bits of this register are zeros.
#define F1_MOTO_LLOADING_A1_RX_01 (*((volatile short *)(FPGA1_BASE | (0x11B * Word1OrByte2)))) //The 16 Lsb bits of the shifted in data.
#define F1_MOTO_LLOADING_A1_WORDS (*((volatile short *)(FPGA1_BASE | (0x11C * Word1OrByte2)))) //The amount of spi words (usually byte sized) per transmission.
//SPI_F1_MOTO_DRYER_LOADARM_A1
#define F1_MOTO_DRYER_LOADARM_A1_TX_00 (*((volatile short *)(FPGA1_BASE | (0x120 * Word1OrByte2)))) //The second register to be shifted out of the spi. The msb bit of this register is shifted out first.
#define F1_MOTO_DRYER_LOADARM_A1_TX_01 (*((volatile short *)(FPGA1_BASE | (0x121 * Word1OrByte2)))) //The first register to be shifted out of the spi. The msb bit of this register is shifted out first.
#define F1_MOTO_DRYER_LOADARM_A1_RX_00 (*((volatile short *)(FPGA1_BASE | (0x122 * Word1OrByte2)))) //The 8 msb bits of the shifted in bits. The 8 msb bits of this register are zeros.
#define F1_MOTO_DRYER_LOADARM_A1_RX_01 (*((volatile short *)(FPGA1_BASE | (0x123 * Word1OrByte2)))) //The 16 Lsb bits of the shifted in data.
#define F1_MOTO_DRYER_LOADARM_A1_WORDS (*((volatile short *)(FPGA1_BASE | (0x124 * Word1OrByte2)))) //The amount of spi words (usually byte sized) per transmission.
//SPI_F1_MOTO_DRYER_DRIVING_A1
#define F1_MOTO_DRYER_DRIVING_A1_TX_00 (*((volatile short *)(FPGA1_BASE | (0x128 * Word1OrByte2)))) //The second register to be shifted out of the spi. The msb bit of this register is shifted out first.
#define F1_MOTO_DRYER_DRIVING_A1_TX_01 (*((volatile short *)(FPGA1_BASE | (0x129 * Word1OrByte2)))) //The first register to be shifted out of the spi. The msb bit of this register is shifted out first.
#define F1_MOTO_DRYER_DRIVING_A1_RX_00 (*((volatile short *)(FPGA1_BASE | (0x12A * Word1OrByte2)))) //The 8 msb bits of the shifted in bits. The 8 msb bits of this register are zeros.
#define F1_MOTO_DRYER_DRIVING_A1_RX_01 (*((volatile short *)(FPGA1_BASE | (0x12B * Word1OrByte2)))) //The 16 Lsb bits of the shifted in data.
#define F1_MOTO_DRYER_DRIVING_A1_WORDS (*((volatile short *)(FPGA1_BASE | (0x12C * Word1OrByte2)))) //The amount of spi words (usually byte sized) per transmission.
//SPI_F1_MOTO_DH_CLEANHEAD_A1
#define F1_MOTO_DH_CLEANHEAD_A1_TX_00 (*((volatile short *)(FPGA1_BASE | (0x130 * Word1OrByte2)))) //The second register to be shifted out of the spi. The msb bit of this register is shifted out first.
#define F1_MOTO_DH_CLEANHEAD_A1_TX_01 (*((volatile short *)(FPGA1_BASE | (0x131 * Word1OrByte2)))) //The first register to be shifted out of the spi. The msb bit of this register is shifted out first.
#define F1_MOTO_DH_CLEANHEAD_A1_RX_00 (*((volatile short *)(FPGA1_BASE | (0x132 * Word1OrByte2)))) //The 8 msb bits of the shifted in bits. The 8 msb bits of this register are zeros.
#define F1_MOTO_DH_CLEANHEAD_A1_RX_01 (*((volatile short *)(FPGA1_BASE | (0x133 * Word1OrByte2)))) //The 16 Lsb bits of the shifted in data.
#define F1_MOTO_DH_CLEANHEAD_A1_WORDS (*((volatile short *)(FPGA1_BASE | (0x134 * Word1OrByte2)))) //The amount of spi words (usually byte sized) per transmission.
//SPI_F1_MOTO_DH_CLEANMECH_A1
#define F1_MOTO_DH_CLEANMECH_A1_TX_00 (*((volatile short *)(FPGA1_BASE | (0x138 * Word1OrByte2)))) //The second register to be shifted out of the spi. The msb bit of this register is shifted out first.
#define F1_MOTO_DH_CLEANMECH_A1_TX_01 (*((volatile short *)(FPGA1_BASE | (0x139 * Word1OrByte2)))) //The first register to be shifted out of the spi. The msb bit of this register is shifted out first.
#define F1_MOTO_DH_CLEANMECH_A1_RX_00 (*((volatile short *)(FPGA1_BASE | (0x13A * Word1OrByte2)))) //The 8 msb bits of the shifted in bits. The 8 msb bits of this register are zeros.
#define F1_MOTO_DH_CLEANMECH_A1_RX_01 (*((volatile short *)(FPGA1_BASE | (0x13B * Word1OrByte2)))) //The 16 Lsb bits of the shifted in data.
#define F1_MOTO_DH_CLEANMECH_A1_WORDS (*((volatile short *)(FPGA1_BASE | (0x13C * Word1OrByte2)))) //The amount of spi words (usually byte sized) per transmission.
//SPI_F1_MOTO_SCREW_A1
#define F1_MOTO_SCREW_A1_TX_00 (*((volatile short *)(FPGA1_BASE | (0x140 * Word1OrByte2)))) //The second register to be shifted out of the spi. The msb bit of this register is shifted out first.
#define F1_MOTO_SCREW_A1_TX_01 (*((volatile short *)(FPGA1_BASE | (0x141 * Word1OrByte2)))) //The first register to be shifted out of the spi. The msb bit of this register is shifted out first.
#define F1_MOTO_SCREW_A1_RX_00 (*((volatile short *)(FPGA1_BASE | (0x142 * Word1OrByte2)))) //The 8 msb bits of the shifted in bits. The 8 msb bits of this register are zeros.
#define F1_MOTO_SCREW_A1_RX_01 (*((volatile short *)(FPGA1_BASE | (0x143 * Word1OrByte2)))) //The 16 Lsb bits of the shifted in data.
#define F1_MOTO_SCREW_A1_WORDS (*((volatile short *)(FPGA1_BASE | (0x144 * Word1OrByte2)))) //The amount of spi words (usually byte sized) per transmission.
//SPI_F1_MOTO_WINDER_A1
#define F1_MOTO_WINDER_A1_TX_00 (*((volatile short *)(FPGA1_BASE | (0x148 * Word1OrByte2)))) //The second register to be shifted out of the spi. The msb bit of this register is shifted out first.
#define F1_MOTO_WINDER_A1_TX_01 (*((volatile short *)(FPGA1_BASE | (0x149 * Word1OrByte2)))) //The first register to be shifted out of the spi. The msb bit of this register is shifted out first.
#define F1_MOTO_WINDER_A1_RX_00 (*((volatile short *)(FPGA1_BASE | (0x14A * Word1OrByte2)))) //The 8 msb bits of the shifted in bits. The 8 msb bits of this register are zeros.
#define F1_MOTO_WINDER_A1_RX_01 (*((volatile short *)(FPGA1_BASE | (0x14B * Word1OrByte2)))) //The 16 Lsb bits of the shifted in data.
#define F1_MOTO_WINDER_A1_WORDS (*((volatile short *)(FPGA1_BASE | (0x14C * Word1OrByte2)))) //The amount of spi words (usually byte sized) per transmission.
//SPI_MOTO_RLOADARM_A1
#define F1_MOTO_RLOADARM_A1_TX_00 (*((volatile short *)(FPGA1_BASE | (0x150 * Word1OrByte2)))) //The second register to be shifted out of the spi. The msb bit of this register is shifted out first.
#define F1_MOTO_RLOADARM_A1_TX_01 (*((volatile short *)(FPGA1_BASE | (0x151 * Word1OrByte2)))) //The first register to be shifted out of the spi. The msb bit of this register is shifted out first.
#define F1_MOTO_RLOADARM_A1_RX_00 (*((volatile short *)(FPGA1_BASE | (0x152 * Word1OrByte2)))) //The 8 msb bits of the shifted in bits. The 8 msb bits of this register are zeros.
#define F1_MOTO_RLOADARM_A1_RX_01 (*((volatile short *)(FPGA1_BASE | (0x153 * Word1OrByte2)))) //The 16 Lsb bits of the shifted in data.
#define F1_MOTO_RLOADARM_A1_WORDS (*((volatile short *)(FPGA1_BASE | (0x154 * Word1OrByte2)))) //The amount of spi words (usually byte sized) per transmission.
//SPI_MOTO_RDANCER_A1
#define F1_MOTO_RDANCER_A1_TX_00 (*((volatile short *)(FPGA1_BASE | (0x158 * Word1OrByte2)))) //The second register to be shifted out of the spi. The msb bit of this register is shifted out first.
#define F1_MOTO_RDANCER_A1_TX_01 (*((volatile short *)(FPGA1_BASE | (0x159 * Word1OrByte2)))) //The first register to be shifted out of the spi. The msb bit of this register is shifted out first.
#define F1_MOTO_RDANCER_A1_RX_00 (*((volatile short *)(FPGA1_BASE | (0x15A * Word1OrByte2)))) //The 8 msb bits of the shifted in bits. The 8 msb bits of this register are zeros.
#define F1_MOTO_RDANCER_A1_RX_01 (*((volatile short *)(FPGA1_BASE | (0x15B * Word1OrByte2)))) //The 16 Lsb bits of the shifted in data.
#define F1_MOTO_RDANCER_A1_WORDS (*((volatile short *)(FPGA1_BASE | (0x15C * Word1OrByte2)))) //The amount of spi words (usually byte sized) per transmission.
//SPI_MOTO_LDANCER1_A1
#define F1_MOTO_LDANCER1_A1_TX_00 (*((volatile short *)(FPGA1_BASE | (0x160 * Word1OrByte2)))) //The second register to be shifted out of the spi. The msb bit of this register is shifted out first.
#define F1_MOTO_LDANCER1_A1_TX_01 (*((volatile short *)(FPGA1_BASE | (0x161 * Word1OrByte2)))) //The first register to be shifted out of the spi. The msb bit of this register is shifted out first.
#define F1_MOTO_LDANCER1_A1_RX_00 (*((volatile short *)(FPGA1_BASE | (0x162 * Word1OrByte2)))) //The 8 msb bits of the shifted in bits. The 8 msb bits of this register are zeros.
#define F1_MOTO_LDANCER1_A1_RX_01 (*((volatile short *)(FPGA1_BASE | (0x163 * Word1OrByte2)))) //The 16 Lsb bits of the shifted in data.
#define F1_MOTO_LDANCER1_A1_WORDS (*((volatile short *)(FPGA1_BASE | (0x164 * Word1OrByte2)))) //The amount of spi words (usually byte sized) per transmission.
//SPI_MOTO_LDANCER2_A1
#define F1_MOTO_LDANCER2_A1_TX_00 (*((volatile short *)(FPGA1_BASE | (0x168 * Word1OrByte2)))) //The second register to be shifted out of the spi. The msb bit of this register is shifted out first.
#define F1_MOTO_LDANCER2_A1_TX_01 (*((volatile short *)(FPGA1_BASE | (0x169 * Word1OrByte2)))) //The first register to be shifted out of the spi. The msb bit of this register is shifted out first.
#define F1_MOTO_LDANCER2_A1_RX_00 (*((volatile short *)(FPGA1_BASE | (0x16A * Word1OrByte2)))) //The 8 msb bits of the shifted in bits. The 8 msb bits of this register are zeros.
#define F1_MOTO_LDANCER2_A1_RX_01 (*((volatile short *)(FPGA1_BASE | (0x16B * Word1OrByte2)))) //The 16 Lsb bits of the shifted in data.
#define F1_MOTO_LDANCER2_A1_WORDS (*((volatile short *)(FPGA1_BASE | (0x16C * Word1OrByte2)))) //The amount of spi words (usually byte sized) per transmission.
//SPI_MOTO_DRYER_LID_A1
#define F1_MOTO_DRYER_LID_A1_TX_00 (*((volatile short *)(FPGA1_BASE | (0x170 * Word1OrByte2)))) //The second register to be shifted out of the spi. The msb bit of this register is shifted out first.
#define F1_MOTO_DRYER_LID_A1_TX_01 (*((volatile short *)(FPGA1_BASE | (0x171 * Word1OrByte2)))) //The first register to be shifted out of the spi. The msb bit of this register is shifted out first.
#define F1_MOTO_DRYER_LID_A1_RX_00 (*((volatile short *)(FPGA1_BASE | (0x172 * Word1OrByte2)))) //The 8 msb bits of the shifted in bits. The 8 msb bits of this register are zeros.
#define F1_MOTO_DRYER_LID_A1_RX_01 (*((volatile short *)(FPGA1_BASE | (0x173 * Word1OrByte2)))) //The 16 Lsb bits of the shifted in data.
#define F1_MOTO_DRYER_LID_A1_WORDS (*((volatile short *)(FPGA1_BASE | (0x174 * Word1OrByte2)))) //The amount of spi words (usually byte sized) per transmission.
//SPI_MOTO_DH_LID_A1
#define F1_MOTO_DH_LID_A1_TX_00 (*((volatile short *)(FPGA1_BASE | (0x178 * Word1OrByte2)))) //The second register to be shifted out of the spi. The msb bit of this register is shifted out first.
#define F1_MOTO_DH_LID_A1_TX_01 (*((volatile short *)(FPGA1_BASE | (0x179 * Word1OrByte2)))) //The first register to be shifted out of the spi. The msb bit of this register is shifted out first.
#define F1_MOTO_DH_LID_A1_RX_00 (*((volatile short *)(FPGA1_BASE | (0x17A * Word1OrByte2)))) //The 8 msb bits of the shifted in bits. The 8 msb bits of this register are zeros.
#define F1_MOTO_DH_LID_A1_RX_01 (*((volatile short *)(FPGA1_BASE | (0x17B * Word1OrByte2)))) //The 16 Lsb bits of the shifted in data.
#define F1_MOTO_DH_LID_A1_WORDS (*((volatile short *)(FPGA1_BASE | (0x17C * Word1OrByte2)))) //The amount of spi words (usually byte sized) per transmission.
//SPI_MOTO_LPIVOT1_A1
#define F1_MOTO_LPIVOT1_A1_TX_00 (*((volatile short *)(FPGA1_BASE | (0x180 * Word1OrByte2)))) //The second register to be shifted out of the spi. The msb bit of this register is shifted out first.
#define F1_MOTO_LPIVOT1_A1_TX_01 (*((volatile short *)(FPGA1_BASE | (0x181 * Word1OrByte2)))) //The first register to be shifted out of the spi. The msb bit of this register is shifted out first.
#define F1_MOTO_LPIVOT1_A1_RX_00 (*((volatile short *)(FPGA1_BASE | (0x182 * Word1OrByte2)))) //The 8 msb bits of the shifted in bits. The 8 msb bits of this register are zeros.
#define F1_MOTO_LPIVOT1_A1_RX_01 (*((volatile short *)(FPGA1_BASE | (0x183 * Word1OrByte2)))) //The 16 Lsb bits of the shifted in data.
#define F1_MOTO_LPIVOT1_A1_WORDS (*((volatile short *)(FPGA1_BASE | (0x184 * Word1OrByte2)))) //The amount of spi words (usually byte sized) per transmission.
//SSI
#define F1_LDANCER1_ROTENC_DATA_p_RX_msb (*((volatile short *)(FPGA1_BASE | (0x190 * Word1OrByte2)))) //16 bit MSB if nessesary
#define F1_LDANCER1_ROTENC_DATA_p_RX_lsb (*((volatile short *)(FPGA1_BASE | (0x191 * Word1OrByte2)))) //The 16 Lsb bits of the shifted in data.
#define F1_LDANCER1_ROTENC_DATA_p_TX (*((volatile short *)(FPGA1_BASE | (0x197 * Word1OrByte2)))) //This register triggers a TX transmission
#define F1_LDANCER2_ROTENC_DATA_p_RX_msb (*((volatile short *)(FPGA1_BASE | (0x198 * Word1OrByte2)))) //16 bit MSB if nessesary
#define F1_LDANCER2_ROTENC_DATA_p_RX_lsb (*((volatile short *)(FPGA1_BASE | (0x199 * Word1OrByte2)))) //The 16 Lsb bits of the shifted in data.
#define F1_LDANCER2_ROTENC_DATA_p_TX (*((volatile short *)(FPGA1_BASE | (0x19F * Word1OrByte2)))) //This register triggers a TX transmission
#define F1_LSPARE_ROTENC_DATA_p_RX_msb (*((volatile short *)(FPGA1_BASE | (0x1a0 * Word1OrByte2)))) //16 bit MSB if nessesary
#define F1_LSPARE_ROTENC_DATA_p_RX_lsb (*((volatile short *)(FPGA1_BASE | (0x1a1 * Word1OrByte2)))) //The 16 Lsb bits of the shifted in data.
#define F1_LSPARE_ROTENC_DATA_p_TX (*((volatile short *)(FPGA1_BASE | (0x1A7 * Word1OrByte2)))) //This register triggers a TX transmission
#define F1_RDANCER_ROTENC_DATA_p_RX_msb (*((volatile short *)(FPGA1_BASE | (0x1a8 * Word1OrByte2)))) //16 bit MSB if nessesary
#define F1_RDANCER_ROTENC_DATA_p_RX_lsb (*((volatile short *)(FPGA1_BASE | (0x1a9 * Word1OrByte2)))) //The 16 Lsb bits of the shifted in data.
#define F1_RDANCER_ROTENC_DATA_p_TX (*((volatile short *)(FPGA1_BASE | (0x1AF * Word1OrByte2)))) //This register triggers a TX transmission
#define F1_RSPARE_ROTENC_DATA_p_RX_msb (*((volatile short *)(FPGA1_BASE | (0x1b0 * Word1OrByte2)))) //16 bit MSB if nessesary
#define F1_RSPARE_ROTENC_DATA_p_RX_lsb (*((volatile short *)(FPGA1_BASE | (0x1b1 * Word1OrByte2)))) //The 16 Lsb bits of the shifted in data.
#define F1_RSPARE_ROTENC_DATA_p_TX (*((volatile short *)(FPGA1_BASE | (0x1B7 * Word1OrByte2)))) //This register triggers a TX transmission
#define F1_Tacho_reg0 (*((volatile short *)(FPGA1_BASE | (0x1E0 * Word1OrByte2)))) //This Register stores the Tacho counter
#define F1_Tacho_reg1 (*((volatile short *)(FPGA1_BASE | (0x1E1 * Word1OrByte2)))) //This Register stores the Tacho counter
#define F1_Tacho_reg2 (*((volatile short *)(FPGA1_BASE | (0x1E2 * Word1OrByte2)))) //This Register stores the Tacho counter
#define F1_Tacho_reg3 (*((volatile short *)(FPGA1_BASE | (0x1E3 * Word1OrByte2)))) //This Register stores the Tacho counter
#define F1_Tacho_reg4 (*((volatile short *)(FPGA1_BASE | (0x1E4 * Word1OrByte2)))) //This Register stores the Tacho counter
#define F1_Tacho_reg5 (*((volatile short *)(FPGA1_BASE | (0x1E5 * Word1OrByte2)))) //This Register stores the Tacho counter
#define F1_Tacho_reg6 (*((volatile short *)(FPGA1_BASE | (0x1E6 * Word1OrByte2)))) //This Register stores the Tacho counter
#define F1_Tacho_reg7 (*((volatile short *)(FPGA1_BASE | (0x1E7 * Word1OrByte2)))) //This Register stores the Tacho counter
//Prescaler
#define F1_Prescaler1_reg1 (*((volatile short *)(FPGA1_BASE | (0x1F0 * Word1OrByte2)))) //Parameter for prescaler divisions - 6bit ssi high duty cycle value for prescaler
#define F1_Prescaler1_reg2 (*((volatile short *)(FPGA1_BASE | (0x1F1 * Word1OrByte2)))) //Parameter for prescaler divisions - 6bit ssi low duty cycle value for prescaler
#define F1_Prescaler1_reg3 (*((volatile short *)(FPGA1_BASE | (0x1F2 * Word1OrByte2)))) //Parameter for prescaler divisions - 3bit spi moto low duty cycle value for pmw
#define F1_Prescaler1_reg4 (*((volatile short *)(FPGA1_BASE | (0x1F3 * Word1OrByte2)))) //Parameter for prescaler divisions - 3bit spi moto high duty cycle value for pmw
#define F1_Prescaler1_reg5 (*((volatile short *)(FPGA1_BASE | (0x1F4 * Word1OrByte2)))) //Parameter for prescaler divisions - amount of prescaled clocks for counter of signal All Tachos
#define F1_Prescaler1_reg6 (*((volatile short *)(FPGA1_BASE | (0x1F5 * Word1OrByte2)))) //Parameter for prescaler divisions
#define F1_Prescaler1_reg7 (*((volatile short *)(FPGA1_BASE | (0x1F6 * Word1OrByte2)))) //Parameter for prescaler divisions
#define F1_Prescaler1_reg8 (*((volatile short *)(FPGA1_BASE | (0x1F7 * Word1OrByte2)))) //Parameter for prescaler divisions
//Test
#define F1_Test (*((volatile short *)(FPGA1_BASE | (0x1f8 * Word1OrByte2)))) //Readback not -gives the inverse of the written to value
// * * * * * * * * * * * * * * * * FPGA 2 * * * * * * * * * * * * * * * * //
//Version1
#define F2_Ver1_D (*((volatile short *)(FPGA2_BASE | (0x00 * Word1OrByte2)))) //Version of Fpga is held here
//Version2
#define F2_Ver2_D (*((volatile short *)(FPGA2_BASE | (0x08 * Word1OrByte2)))) //Version of Fpga is held here
//GPI shorterrupt LS_01 Registers
#define F2_GPI_LS1_D (*((volatile short *)(FPGA2_BASE | (0x10 * Word1OrByte2)))) //Reads the direct values that are currently being sent to the fpga.
#define F2_GPI_LS1_L (*((volatile short *)(FPGA2_BASE | (0x11 * Word1OrByte2)))) //Value of the latched shorterrupts that have occurred
#define F2_GPI_LS1_M (*((volatile short *)(FPGA2_BASE | (0x12 * Word1OrByte2)))) //Value of the shorterrupt mask, Default is 0x0000
//GPI shorterrupt LS_02 Registers
#define F2_GPI_LS2_D (*((volatile short *)(FPGA2_BASE | (0x18 * Word1OrByte2)))) //Reads the direct values that are currently being sent to the fpga.
#define F2_GPI_LS2_L (*((volatile short *)(FPGA2_BASE | (0x19 * Word1OrByte2)))) //Value of the latched shorterrupts that have occurred
#define F2_GPI_LS2_M (*((volatile short *)(FPGA2_BASE | (0x1a * Word1OrByte2)))) //Value of the shorterrupt mask, Default is 0x0000
//GPI shorterrupt LS_03 Registers
#define F2_GPI_LS3_D (*((volatile short *)(FPGA2_BASE | (0x20 * Word1OrByte2)))) //Reads the direct values that are currently being sent to the fpga.
#define F2_GPI_LS3_L (*((volatile short *)(FPGA2_BASE | (0x21 * Word1OrByte2)))) //Value of the latched shorterrupts that have occurred
#define F2_GPI_LS3_M (*((volatile short *)(FPGA2_BASE | (0x22 * Word1OrByte2)))) //Value of the shorterrupt mask, Default is 0x0000
//Moto_Driver_NBUSY_register1
#define F2_Moto_Driver_NBUSY1_D (*((volatile short *)(FPGA2_BASE | (0x28 * Word1OrByte2)))) //Reads the direct values that are currently being sent to the fpga.
#define F2_Moto_Driver_NBUSY1_L (*((volatile short *)(FPGA2_BASE | (0x29 * Word1OrByte2)))) //Value of the latched shorterrupts that have occurred
#define F2_Moto_Driver_NBUSY1_M (*((volatile short *)(FPGA2_BASE | (0x2a * Word1OrByte2)))) //Value of the shorterrupt mask, Default is 0x0000
//DISPENSER_VALVE_IN
#define F2_DISPENSER_VALVE_IN_Direct (*((volatile short *)(FPGA2_BASE | (0x030 * Word1OrByte2)))) //Reads the direct values that are currently being sent to the fpga.
#define F2_DISPENSER_VALVE_IN_Latched (*((volatile short *)(FPGA2_BASE | (0x031 * Word1OrByte2)))) //Value of the latched shorterrupts that have occurred
#define F2_DISPENSER_VALVE_IN_Mask (*((volatile short *)(FPGA2_BASE | (0x032 * Word1OrByte2)))) //Value of the shorterrupt mask, Default is 0x0000
//GPI_REGISTER1
#define F2_GPI_REGISTER1_Direct (*((volatile short *)(FPGA2_BASE | (0x038 * Word1OrByte2)))) //Reads the direct values that are currently being sent to the fpga.
#define F2_GPI_REGISTER1_Latched (*((volatile short *)(FPGA2_BASE | (0x039 * Word1OrByte2)))) //Value of the latched shorterrupts that have occurred
#define F2_GPI_REGISTER1_Mask (*((volatile short *)(FPGA2_BASE | (0x03A * Word1OrByte2)))) //Value of the shorterrupt mask, Default is 0x0000
//LS_04
#define F2_LS_04_Direct (*((volatile short *)(FPGA2_BASE | (0x040 * Word1OrByte2)))) //Version of Fpga is held here
#define F2_LS_04_Latched (*((volatile short *)(FPGA2_BASE | (0x041 * Word1OrByte2)))) //Value of the latched shorterrupts that have occurred
#define F2_LS_04_Mask (*((volatile short *)(FPGA2_BASE | (0x042 * Word1OrByte2)))) //Value of the shorterrupt mask, Default is 0x0000
//SPI_Busy_register1
#define F2_SPI_Busy1_Direct (*((volatile short *)(FPGA2_BASE | (0x048 * Word1OrByte2)))) //Reads the direct values that are currently being sent to the fpga.
#define F2_SPI_Busy1_Latched (*((volatile short *)(FPGA2_BASE | (0x049 * Word1OrByte2)))) //Value of the latched shorterrupts that have occurred
#define F2_SPI_Busy1_Mask (*((volatile short *)(FPGA2_BASE | (0x04a * Word1OrByte2)))) //Value of the shorterrupt mask, Default is 0x0000
//SPI_Busy_register2
#define F2_SPI_Busy2_Direct (*((volatile short *)(FPGA2_BASE | (0x050 * Word1OrByte2)))) //Reads the direct values that are currently being sent to the fpga.
#define F2_SPI_Busy2_Latched (*((volatile short *)(FPGA2_BASE | (0x051 * Word1OrByte2)))) //Value of the latched shorterrupts that have occurred
#define F2_SPI_Busy2_Mask (*((volatile short *)(FPGA2_BASE | (0x052 * Word1OrByte2)))) //Value of the shorterrupt mask, Default is 0x0000
//Moto_Driver_NSTBYRST_register1
#define F2_Moto_Driver_NSTBYRST1 (*((volatile short *)(FPGA2_BASE | (0x059 * Word1OrByte2)))) //Writes to values. Readback thevaluessthat are currently in the GPO register
//DISPENSER_VALVE_OUT
#define F2_DISPENSER_VALVE_OUT (*((volatile short *)(FPGA2_BASE | (0x061 * Word1OrByte2)))) //Writes to values. Readback thevaluessthat are currently in the GPO register
//Moto_Driver_SW_register1
#define F2_Moto_Driver_SW1 (*((volatile short *)(FPGA2_BASE | (0x069 * Word1OrByte2)))) //Writes to values. Readback thevaluessthat are currently in the GPO register
//CTRL
#define F2_CTRL (*((volatile short *)(FPGA2_BASE | (0x071 * Word1OrByte2)))) //Writes to values. Readback thevaluessthat are currently in the GPO register
//GPO_REGISTER
#define F2_GPO_REGISTER (*((volatile short *)(FPGA2_BASE | (0x079 * Word1OrByte2)))) //Writes to values. Readback thevaluessthat are currently in the GPO register
#define F2_Prescaler1_reg9 (*((volatile short *)(FPGA2_BASE | (0x081 * Word1OrByte2)))) //Parameter for prescaler divisions -amount of prescaled clocks for counter of signal Blower Tacho.
#define F2_Prescaler1_reg10 (*((volatile short *)(FPGA2_BASE | (0x089 * Word1OrByte2)))) //Parameter for prescaler divisions -amount of prescaled clocks clk input of pwm of signal F2_GPO_BLOWER_PWM. 8bits
#define F2_VALVE_VALUE (*((volatile short *)(FPGA2_BASE | (0x091 * Word1OrByte2)))) //This register holds the vlave values for the vlave pulse counter
//SSI
#define F2_DISPENSER_ROTENC_DATA_p_1_RX_msb (*((volatile short *)(FPGA2_BASE | (0x0C0 * Word1OrByte2)))) //16 bit MSB if nessesary
#define F2_DISPENSER_ROTENC_DATA_p_1_RX_lsb (*((volatile short *)(FPGA2_BASE | (0x0C1 * Word1OrByte2)))) //The 16 Lsb bits of the shifted in data.
#define F2_DISPENSER_ROTENC_DATA_p_1_TX (*((volatile short *)(FPGA2_BASE | (0x0C7 * Word1OrByte2)))) //This register triggers a TX transmission
#define F2_DISPENSER_ROTENC_DATA_p_2_RX_msb (*((volatile short *)(FPGA2_BASE | (0x0C8 * Word1OrByte2)))) //16 bit MSB if nessesary
#define F2_DISPENSER_ROTENC_DATA_p_2_RX_lsb (*((volatile short *)(FPGA2_BASE | (0x0C9 * Word1OrByte2)))) //The 16 Lsb bits of the shifted in data.
#define F2_DISPENSER_ROTENC_DATA_p_2_TX (*((volatile short *)(FPGA2_BASE | (0x0Cf * Word1OrByte2)))) //This register triggers a TX transmission
#define F2_DISPENSER_ROTENC_DATA_p_3_RX_msb (*((volatile short *)(FPGA2_BASE | (0x0D0 * Word1OrByte2)))) //16 bit MSB if nessesary
#define F2_DISPENSER_ROTENC_DATA_p_3_RX_lsb (*((volatile short *)(FPGA2_BASE | (0x0D1 * Word1OrByte2)))) //16 bit MSB if nessesary
#define F2_DISPENSER_ROTENC_DATA_p_3_TX (*((volatile short *)(FPGA2_BASE | (0x0D7 * Word1OrByte2)))) //This register triggers a TX transmission
#define F2_DISPENSER_ROTENC_DATA_p_4_RX_msb (*((volatile short *)(FPGA2_BASE | (0x0D8 * Word1OrByte2)))) //The 16 Lsb bits of the shifted in data.
#define F2_DISPENSER_ROTENC_DATA_p_4_RX_lsb (*((volatile short *)(FPGA2_BASE | (0x0D9 * Word1OrByte2)))) //16 bit MSB if nessesary
#define F2_DISPENSER_ROTENC_DATA_p_4_TX (*((volatile short *)(FPGA2_BASE | (0x0DF * Word1OrByte2)))) //This register triggers a TX transmission
#define F2_DISPENSER_ROTENC_DATA_p_5_RX_msb (*((volatile short *)(FPGA2_BASE | (0x0E0 * Word1OrByte2)))) //The 16 Lsb bits of the shifted in data.
#define F2_DISPENSER_ROTENC_DATA_p_5_RX_lsb (*((volatile short *)(FPGA2_BASE | (0x0E1 * Word1OrByte2)))) //16 bit MSB if nessesary
#define F2_DISPENSER_ROTENC_DATA_p_5_TX (*((volatile short *)(FPGA2_BASE | (0x0E7 * Word1OrByte2)))) //This register triggers a TX transmission
#define F2_DISPENSER_ROTENC_DATA_p_6_RX_msb (*((volatile short *)(FPGA2_BASE | (0x0E8 * Word1OrByte2)))) //16 bit MSB if nessesary
#define F2_DISPENSER_ROTENC_DATA_p_6_RX_lsb (*((volatile short *)(FPGA2_BASE | (0x0E9 * Word1OrByte2)))) //The 16 Lsb bits of the shifted in data.
#define F2_DISPENSER_ROTENC_DATA_p_6_TX (*((volatile short *)(FPGA2_BASE | (0x0EF * Word1OrByte2)))) //This register triggers a TX transmission
#define F2_DISPENSER_ROTENC_DATA_p_7_RX_msb (*((volatile short *)(FPGA2_BASE | (0x0F0 * Word1OrByte2)))) //16 bit MSB if nessesary
#define F2_DISPENSER_ROTENC_DATA_p_7_RX_lsb (*((volatile short *)(FPGA2_BASE | (0x0F1 * Word1OrByte2)))) //The 16 Lsb bits of the shifted in data.
#define F2_DISPENSER_ROTENC_DATA_p_7_TX (*((volatile short *)(FPGA2_BASE | (0x0F7 * Word1OrByte2)))) //This register triggers a TX transmission
#define F2_DISPENSER_ROTENC_DATA_p_8_RX_msb (*((volatile short *)(FPGA2_BASE | (0x0F8 * Word1OrByte2)))) //16 bit MSB if nessesary
#define F2_DISPENSER_ROTENC_DATA_p_8_RX_lsb (*((volatile short *)(FPGA2_BASE | (0x0F9 * Word1OrByte2)))) //The 16 Lsb bits of the shifted in data.
#define F2_DISPENSER_ROTENC_DATA_p_8_TX (*((volatile short *)(FPGA2_BASE | (0x0FF * Word1OrByte2)))) //This register triggers a TX transmission
//ANALOG_DYEINGH_TEMP1_1
#define F2_ANALOG_DYEINGH_TEMP1_1_TX_00 (*((volatile short *)(FPGA2_BASE | (0x100 * Word1OrByte2)))) //The second register to be shifted out of the spi. The msb bit of this register is shifted out first.
#define F2_ANALOG_DYEINGH_TEMP1_1_TX_01 (*((volatile short *)(FPGA2_BASE | (0x101 * Word1OrByte2)))) //The first register to be shifted out of the spi. The msb bit of this register is shifted out first.
#define F2_ANALOG_DYEINGH_TEMP1_1_RX_00 (*((volatile short *)(FPGA2_BASE | (0x102 * Word1OrByte2)))) //The 8 msb bits of the shifted in bits. The 8 msb bits of this register are zeros.
#define F2_ANALOG_DYEINGH_TEMP1_1_RX_01 (*((volatile short *)(FPGA2_BASE | (0x103 * Word1OrByte2)))) //The 16 Lsb bits of the shifted in data.
#define F2_ANALOG_DYEINGH_TEMP1_1_WORDS (*((volatile short *)(FPGA1_BASE | (0x104 * Word1OrByte2)))) //The amount of spi words (usually byte sized) per transmission.
//AN_ENCLOSURETEMP1_1
#define F2_AN_ENCLOSURETEMP1_1_TX_00 (*((volatile short *)(FPGA2_BASE | (0x108 * Word1OrByte2)))) //The second register to be shifted out of the spi. The msb bit of this register is shifted out first.
#define F2_AN_ENCLOSURETEMP1_1_TX_01 (*((volatile short *)(FPGA2_BASE | (0x109 * Word1OrByte2)))) //The first register to be shifted out of the spi. The msb bit of this register is shifted out first.
#define F2_AN_ENCLOSURETEMP1_1_RX_00 (*((volatile short *)(FPGA2_BASE | (0x10A * Word1OrByte2)))) //The 8 msb bits of the shifted in bits. The 8 msb bits of this register are zeros.
#define F2_AN_ENCLOSURETEMP1_1_RX_01 (*((volatile short *)(FPGA2_BASE | (0x10B * Word1OrByte2)))) //The 16 Lsb bits of the shifted in data.
#define F2_AN_ENCLOSURETEMP1_1_WORDS (*((volatile short *)(FPGA1_BASE | (0x10C * Word1OrByte2)))) //The amount of spi words (usually byte sized) per transmission.
//ANALOG_DYEINGH_TEMP2
#define F2_ANALOG_DYEINGH_TEMP2_TX_00 (*((volatile short *)(FPGA2_BASE | (0x110 * Word1OrByte2)))) //The second register to be shifted out of the spi. The msb bit of this register is shifted out first.
#define F2_ANALOG_DYEINGH_TEMP2_TX_01 (*((volatile short *)(FPGA2_BASE | (0x111 * Word1OrByte2)))) //The first register to be shifted out of the spi. The msb bit of this register is shifted out first.
#define F2_ANALOG_DYEINGH_TEMP2_RX_00 (*((volatile short *)(FPGA2_BASE | (0x112 * Word1OrByte2)))) //The 8 msb bits of the shifted in bits. The 8 msb bits of this register are zeros.
#define F2_ANALOG_DYEINGH_TEMP2_RX_01 (*((volatile short *)(FPGA2_BASE | (0x113 * Word1OrByte2)))) //The 16 Lsb bits of the shifted in data.
#define F2_ANALOG_DYEINGH_TEMP2_WORDS (*((volatile short *)(FPGA1_BASE | (0x104 * Word1OrByte2)))) //The amount of spi words (usually byte sized) per transmission.
//AN_ENCLOSURETEMP2_1
#define F2_AN_ENCLOSURETEMP2_1_TX_00 (*((volatile short *)(FPGA2_BASE | (0x118 * Word1OrByte2)))) //The second register to be shifted out of the spi. The msb bit of this register is shifted out first.
#define F2_AN_ENCLOSURETEMP2_1_TX_01 (*((volatile short *)(FPGA2_BASE | (0x119 * Word1OrByte2)))) //The first register to be shifted out of the spi. The msb bit of this register is shifted out first.
#define F2_AN_ENCLOSURETEMP2_1_RX_00 (*((volatile short *)(FPGA2_BASE | (0x11A * Word1OrByte2)))) //The 8 msb bits of the shifted in bits. The 8 msb bits of this register are zeros.
#define F2_AN_ENCLOSURETEMP2_1_RX_01 (*((volatile short *)(FPGA2_BASE | (0x11B * Word1OrByte2)))) //The 16 Lsb bits of the shifted in data.
#define F2_AN_ENCLOSURETEMP2_1_WORDS (*((volatile short *)(FPGA1_BASE | (0x11C * Word1OrByte2)))) //The amount of spi words (usually byte sized) per transmission.
//ANALOG_DYEINGH_TEMP3
#define F2_ANALOG_DYEINGH_TEMP3_1_TX_00 (*((volatile short *)(FPGA2_BASE | (0x120 * Word1OrByte2)))) //The second register to be shifted out of the spi. The msb bit of this register is shifted out first.
#define F2_ANALOG_DYEINGH_TEMP3_1_TX_01 (*((volatile short *)(FPGA2_BASE | (0x121 * Word1OrByte2)))) //The first register to be shifted out of the spi. The msb bit of this register is shifted out first.
#define F2_ANALOG_DYEINGH_TEMP3_1_RX_00 (*((volatile short *)(FPGA2_BASE | (0x122 * Word1OrByte2)))) //The 8 msb bits of the shifted in bits. The 8 msb bits of this register are zeros.
#define F2_ANALOG_DYEINGH_TEMP3_1_RX_01 (*((volatile short *)(FPGA2_BASE | (0x123 * Word1OrByte2)))) //The 16 Lsb bits of the shifted in data.
#define F2_ANALOG_DYEINGH_TEMP3_1_WORDS (*((volatile short *)(FPGA1_BASE | (0x124 * Word1OrByte2)))) //The amount of spi words (usually byte sized) per transmission.
//AN_ENCLOSURETEMP3_1
#define F2_AN_ENCLOSURETEMP3_1_TX_00 (*((volatile short *)(FPGA2_BASE | (0x128 * Word1OrByte2)))) //The second register to be shifted out of the spi. The msb bit of this register is shifted out first.
#define F2_AN_ENCLOSURETEMP3_1_TX_01 (*((volatile short *)(FPGA2_BASE | (0x129 * Word1OrByte2)))) //The first register to be shifted out of the spi. The msb bit of this register is shifted out first.
#define F2_AN_ENCLOSURETEMP3_1_RX_00 (*((volatile short *)(FPGA2_BASE | (0x12A * Word1OrByte2)))) //The 8 msb bits of the shifted in bits. The 8 msb bits of this register are zeros.
#define F2_AN_ENCLOSURETEMP3_1_RX_01 (*((volatile short *)(FPGA2_BASE | (0x12B * Word1OrByte2)))) //The 16 Lsb bits of the shifted in data.
#define F2_AN_ENCLOSURETEMP3_1_WORDS (*((volatile short *)(FPGA1_BASE | (0x12C * Word1OrByte2)))) //The amount of spi words (usually byte sized) per transmission.
//ANALOG_DYEINGH_TEMP4
#define F2_ANALOG_DYEINGH_TEMP4_1_TX_00 (*((volatile short *)(FPGA2_BASE | (0x130 * Word1OrByte2)))) //The second register to be shifted out of the spi. The msb bit of this register is shifted out first.
#define F2_ANALOG_DYEINGH_TEMP4_1_TX_01 (*((volatile short *)(FPGA2_BASE | (0x131 * Word1OrByte2)))) //The first register to be shifted out of the spi. The msb bit of this register is shifted out first.
#define F2_ANALOG_DYEINGH_TEMP4_1_RX_00 (*((volatile short *)(FPGA2_BASE | (0x132 * Word1OrByte2)))) //The 8 msb bits of the shifted in bits. The 8 msb bits of this register are zeros.
#define F2_ANALOG_DYEINGH_TEMP4_1_RX_01 (*((volatile short *)(FPGA2_BASE | (0x133 * Word1OrByte2)))) //The 16 Lsb bits of the shifted in data.
#define F2_ANALOG_DYEINGH_TEMP4_1_WORDS (*((volatile short *)(FPGA1_BASE | (0x134 * Word1OrByte2)))) //The amount of spi words (usually byte sized) per transmission.
//ANALOG_DRYER_TEMP1
#define F2_ANALOG_DRYER_TEMP1_1_TX_00 (*((volatile short *)(FPGA2_BASE | (0x138 * Word1OrByte2)))) //The second register to be shifted out of the spi. The msb bit of this register is shifted out first.
#define F2_ANALOG_DRYER_TEMP1_1_TX_01 (*((volatile short *)(FPGA2_BASE | (0x139 * Word1OrByte2)))) //The first register to be shifted out of the spi. The msb bit of this register is shifted out first.
#define F2_ANALOG_DRYER_TEMP1_1_RX_00 (*((volatile short *)(FPGA2_BASE | (0x13A * Word1OrByte2)))) //The 8 msb bits of the shifted in bits. The 8 msb bits of this register are zeros.
#define F2_ANALOG_DRYER_TEMP1_1_RX_01 (*((volatile short *)(FPGA2_BASE | (0x13B * Word1OrByte2)))) //The 16 Lsb bits of the shifted in data.
#define F2_ANALOG_DRYER_TEMP1_1_WORDS (*((volatile short *)(FPGA1_BASE | (0x13C * Word1OrByte2)))) //The amount of spi words (usually byte sized) per transmission.
//ANALOG_DYEINGH_TEMP5
#define F2_ANALOG_DYEINGH_TEMP5_1_TX_00 (*((volatile short *)(FPGA2_BASE | (0x140 * Word1OrByte2)))) //The second register to be shifted out of the spi. The msb bit of this register is shifted out first.
#define F2_ANALOG_DYEINGH_TEMP5_1_TX_01 (*((volatile short *)(FPGA2_BASE | (0x141 * Word1OrByte2)))) //The first register to be shifted out of the spi. The msb bit of this register is shifted out first.
#define F2_ANALOG_DYEINGH_TEMP5_1_RX_00 (*((volatile short *)(FPGA2_BASE | (0x142 * Word1OrByte2)))) //The 8 msb bits of the shifted in bits. The 8 msb bits of this register are zeros.
#define F2_ANALOG_DYEINGH_TEMP5_1_RX_01 (*((volatile short *)(FPGA2_BASE | (0x143 * Word1OrByte2)))) //The 16 Lsb bits of the shifted in data.
#define F2_ANALOG_DYEINGH_TEMP5_1_WORDS (*((volatile short *)(FPGA1_BASE | (0x144 * Word1OrByte2)))) //The amount of spi words (usually byte sized) per transmission.
//ANALOG_DRYER_TEMP2
#define F2_ANALOG_DRYER_TEMP2_1_TX_00 (*((volatile short *)(FPGA2_BASE | (0x148 * Word1OrByte2)))) //The second register to be shifted out of the spi. The msb bit of this register is shifted out first.
#define F2_ANALOG_DRYER_TEMP2_1_TX_01 (*((volatile short *)(FPGA2_BASE | (0x149 * Word1OrByte2)))) //The first register to be shifted out of the spi. The msb bit of this register is shifted out first.
#define F2_ANALOG_DRYER_TEMP2_1_RX_00 (*((volatile short *)(FPGA2_BASE | (0x14A * Word1OrByte2)))) //The 8 msb bits of the shifted in bits. The 8 msb bits of this register are zeros.
#define F2_ANALOG_DRYER_TEMP2_1_RX_01 (*((volatile short *)(FPGA2_BASE | (0x14B * Word1OrByte2)))) //The 16 Lsb bits of the shifted in data.
#define F2_ANALOG_DRYER_TEMP2_1_WORDS (*((volatile short *)(FPGA1_BASE | (0x14C * Word1OrByte2)))) //The amount of spi words (usually byte sized) per transmission.
//ANALOG_MIXCHIP_TEMP
#define F2_ANALOG_MIXCHIP_TEMP_1_TX_00 (*((volatile short *)(FPGA2_BASE | (0x150 * Word1OrByte2)))) //The second register to be shifted out of the spi. The msb bit of this register is shifted out first.
#define F2_ANALOG_MIXCHIP_TEMP_1_TX_01 (*((volatile short *)(FPGA2_BASE | (0x151 * Word1OrByte2)))) //The first register to be shifted out of the spi. The msb bit of this register is shifted out first.
#define F2_ANALOG_MIXCHIP_TEMP_1_RX_00 (*((volatile short *)(FPGA2_BASE | (0x152 * Word1OrByte2)))) //The 8 msb bits of the shifted in bits. The 8 msb bits of this register are zeros.
#define F2_ANALOG_MIXCHIP_TEMP_1_RX_01 (*((volatile short *)(FPGA2_BASE | (0x153 * Word1OrByte2)))) //The 16 Lsb bits of the shifted in data.
#define F2_ANALOG_MIXCHIP_TEMP_1_WORDS (*((volatile short *)(FPGA1_BASE | (0x154 * Word1OrByte2)))) //The amount of spi words (usually byte sized) per transmission.
//ANALOG_DRYER_TEMP3
#define F2_ANALOG_DRYER_TEMP3_1_TX_00 (*((volatile short *)(FPGA2_BASE | (0x158 * Word1OrByte2)))) //The second register to be shifted out of the spi. The msb bit of this register is shifted out first.
#define F2_ANALOG_DRYER_TEMP3_1_TX_01 (*((volatile short *)(FPGA2_BASE | (0x159 * Word1OrByte2)))) //The first register to be shifted out of the spi. The msb bit of this register is shifted out first.
#define F2_ANALOG_DRYER_TEMP3_1_RX_00 (*((volatile short *)(FPGA2_BASE | (0x15A * Word1OrByte2)))) //The 8 msb bits of the shifted in bits. The 8 msb bits of this register are zeros.
#define F2_ANALOG_DRYER_TEMP3_1_RX_01 (*((volatile short *)(FPGA2_BASE | (0x15B * Word1OrByte2)))) //The 16 Lsb bits of the shifted in data.
#define F2_ANALOG_DRYER_TEMP3_1_WORDS (*((volatile short *)(FPGA1_BASE | (0x15C * Word1OrByte2)))) //The amount of spi words (usually byte sized) per transmission.
//MOTO_DISPENSER_A1
#define F2_MOTO_DISPENSER_A1_1_TX_00 (*((volatile short *)(FPGA2_BASE | (0x190 * Word1OrByte2)))) //The second register to be shifted out of the spi. The msb bit of this register is shifted out first.
#define F2_MOTO_DISPENSER_A1_1_TX_01 (*((volatile short *)(FPGA2_BASE | (0x191 * Word1OrByte2)))) //The first register to be shifted out of the spi. The msb bit of this register is shifted out first.
#define F2_MOTO_DISPENSER_A1_1_RX_00 (*((volatile short *)(FPGA2_BASE | (0x192 * Word1OrByte2)))) //The 8 msb bits of the shifted in bits. The 8 msb bits of this register are zeros.
#define F2_MOTO_DISPENSER_A1_1_RX_01 (*((volatile short *)(FPGA2_BASE | (0x193 * Word1OrByte2)))) //The 16 Lsb bits of the shifted in data.
#define F2_MOTO_DISPENSER_A1_1_WORDS (*((volatile short *)(FPGA1_BASE | (0x194 * Word1OrByte2)))) //The amount of spi words (usually byte sized) per transmission.
//MOTO_DISPENSER_A1_2
#define F2_MOTO_DISPENSER_A1_2_TX_00 (*((volatile short *)(FPGA2_BASE | (0x198 * Word1OrByte2)))) //The second register to be shifted out of the spi. The msb bit of this register is shifted out first.
#define F2_MOTO_DISPENSER_A1_2_TX_01 (*((volatile short *)(FPGA2_BASE | (0x199 * Word1OrByte2)))) //The first register to be shifted out of the spi. The msb bit of this register is shifted out first.
#define F2_MOTO_DISPENSER_A1_2_RX_00 (*((volatile short *)(FPGA2_BASE | (0x19A * Word1OrByte2)))) //The 8 msb bits of the shifted in bits. The 8 msb bits of this register are zeros.
#define F2_MOTO_DISPENSER_A1_2_RX_01 (*((volatile short *)(FPGA2_BASE | (0x19B * Word1OrByte2)))) //The 16 Lsb bits of the shifted in data.
#define F2_MOTO_DISPENSER_A1_2_WORDS (*((volatile short *)(FPGA1_BASE | (0x19C * Word1OrByte2)))) //The amount of spi words (usually byte sized) per transmission.
//MOTO_DISPENSER_A1_3
#define F2_MOTO_DISPENSER_A1_3_TX_00 (*((volatile short *)(FPGA2_BASE | (0x1A0 * Word1OrByte2)))) //The second register to be shifted out of the spi. The msb bit of this register is shifted out first.
#define F2_MOTO_DISPENSER_A1_3_TX_01 (*((volatile short *)(FPGA2_BASE | (0x1A1 * Word1OrByte2)))) //The first register to be shifted out of the spi. The msb bit of this register is shifted out first.
#define F2_MOTO_DISPENSER_A1_3_RX_00 (*((volatile short *)(FPGA2_BASE | (0x1A2 * Word1OrByte2)))) //The 8 msb bits of the shifted in bits. The 8 msb bits of this register are zeros.
#define F2_MOTO_DISPENSER_A1_3_RX_01 (*((volatile short *)(FPGA2_BASE | (0x1A3 * Word1OrByte2)))) //The 16 Lsb bits of the shifted in data.
#define F2_MOTO_DISPENSER_A1_3_WORDS (*((volatile short *)(FPGA1_BASE | (0x1A4 * Word1OrByte2)))) //The amount of spi words (usually byte sized) per transmission.
//MOTO_DISPENSER_A1_4
#define F2_MOTO_DISPENSER_A1_4_TX_00 (*((volatile short *)(FPGA2_BASE | (0x1A8 * Word1OrByte2)))) //The second register to be shifted out of the spi. The msb bit of this register is shifted out first.
#define F2_MOTO_DISPENSER_A1_4_TX_01 (*((volatile short *)(FPGA2_BASE | (0x1A9 * Word1OrByte2)))) //The first register to be shifted out of the spi. The msb bit of this register is shifted out first.
#define F2_MOTO_DISPENSER_A1_4_RX_00 (*((volatile short *)(FPGA2_BASE | (0x1AA * Word1OrByte2)))) //The 8 msb bits of the shifted in bits. The 8 msb bits of this register are zeros.
#define F2_MOTO_DISPENSER_A1_4_RX_01 (*((volatile short *)(FPGA2_BASE | (0x1AB * Word1OrByte2)))) //The 16 Lsb bits of the shifted in data.
#define F2_MOTO_DISPENSER_A1_4_WORDS (*((volatile short *)(FPGA1_BASE | (0x1AC * Word1OrByte2)))) //The amount of spi words (usually byte sized) per transmission.
//MOTO_DISPENSER_A1_5
#define F2_MOTO_DISPENSER_A1_5_TX_00 (*((volatile short *)(FPGA2_BASE | (0x1B0 * Word1OrByte2)))) //The second register to be shifted out of the spi. The msb bit of this register is shifted out first.
#define F2_MOTO_DISPENSER_A1_5_TX_01 (*((volatile short *)(FPGA2_BASE | (0x1B1 * Word1OrByte2)))) //The first register to be shifted out of the spi. The msb bit of this register is shifted out first.
#define F2_MOTO_DISPENSER_A1_5_RX_00 (*((volatile short *)(FPGA2_BASE | (0x1B2 * Word1OrByte2)))) //The 8 msb bits of the shifted in bits. The 8 msb bits of this register are zeros.
#define F2_MOTO_DISPENSER_A1_5_RX_01 (*((volatile short *)(FPGA2_BASE | (0x1B3 * Word1OrByte2)))) //The 16 Lsb bits of the shifted in data.
#define F2_MOTO_DISPENSER_A1_5_WORDS (*((volatile short *)(FPGA1_BASE | (0x1B4 * Word1OrByte2)))) //The amount of spi words (usually byte sized) per transmission.
//MOTO_DISPENSER_A1_6
#define F2_MOTO_DISPENSER_A1_6_TX_00 (*((volatile short *)(FPGA2_BASE | (0x1B8 * Word1OrByte2)))) //The second register to be shifted out of the spi. The msb bit of this register is shifted out first.
#define F2_MOTO_DISPENSER_A1_6_TX_01 (*((volatile short *)(FPGA2_BASE | (0x1B9 * Word1OrByte2)))) //The first register to be shifted out of the spi. The msb bit of this register is shifted out first.
#define F2_MOTO_DISPENSER_A1_6_RX_00 (*((volatile short *)(FPGA2_BASE | (0x1BA * Word1OrByte2)))) //The 8 msb bits of the shifted in bits. The 8 msb bits of this register are zeros.
#define F2_MOTO_DISPENSER_A1_6_RX_01 (*((volatile short *)(FPGA2_BASE | (0x1BB * Word1OrByte2)))) //The 16 Lsb bits of the shifted in data.
#define F2_MOTO_DISPENSER_A1_6_WORDS (*((volatile short *)(FPGA1_BASE | (0x1BC * Word1OrByte2)))) //The amount of spi words (usually byte sized) per transmission.
//MOTO_DISPENSER_A1_7
#define F2_MOTO_DISPENSER_A1_7_TX_00 (*((volatile short *)(FPGA2_BASE | (0x1C0 * Word1OrByte2)))) //The second register to be shifted out of the spi. The msb bit of this register is shifted out first.
#define F2_MOTO_DISPENSER_A1_7_TX_01 (*((volatile short *)(FPGA2_BASE | (0x1C1 * Word1OrByte2)))) //The first register to be shifted out of the spi. The msb bit of this register is shifted out first.
#define F2_MOTO_DISPENSER_A1_7_RX_00 (*((volatile short *)(FPGA2_BASE | (0x1C2 * Word1OrByte2)))) //The 8 msb bits of the shifted in bits. The 8 msb bits of this register are zeros.
#define F2_MOTO_DISPENSER_A1_7_RX_01 (*((volatile short *)(FPGA2_BASE | (0x1C3 * Word1OrByte2)))) //The 16 Lsb bits of the shifted in data.
#define F2_MOTO_DISPENSER_A1_7_WORDS (*((volatile short *)(FPGA1_BASE | (0x1C4 * Word1OrByte2)))) //The amount of spi words (usually byte sized) per transmission.
//MOTO_DISPENSER_A1_8
#define F2_MOTO_DISPENSER_A1_8_TX_00 (*((volatile short *)(FPGA2_BASE | (0x1C8 * Word1OrByte2)))) //The second register to be shifted out of the spi. The msb bit of this register is shifted out first.
#define F2_MOTO_DISPENSER_A1_8_TX_01 (*((volatile short *)(FPGA2_BASE | (0x1C9 * Word1OrByte2)))) //The first register to be shifted out of the spi. The msb bit of this register is shifted out first.
#define F2_MOTO_DISPENSER_A1_8_RX_00 (*((volatile short *)(FPGA2_BASE | (0x1CA * Word1OrByte2)))) //The 8 msb bits of the shifted in bits. The 8 msb bits of this register are zeros.
#define F2_MOTO_DISPENSER_A1_8_RX_01 (*((volatile short *)(FPGA2_BASE | (0x1CB * Word1OrByte2)))) //The 16 Lsb bits of the shifted in data.
#define F2_MOTO_DISPENSER_A1_8_WORDS (*((volatile short *)(FPGA1_BASE | (0x1CC * Word1OrByte2)))) //The amount of spi words (usually byte sized) per transmission.
#define F2_Tacho_reg0 (*((volatile short *)(FPGA1_BASE | (0x1E0 * Word1OrByte2)))) //This Register stores the Tacho counter
//Prescaler
#define F2_Prescaler1_reg0 (*((volatile short *)(FPGA1_BASE | (0x1F0 * Word1OrByte2)))) //Parameter for prescaler divisions - 6bit ssi high duty cycle value for prescaler
#define F2_Prescaler1_reg1 (*((volatile short *)(FPGA1_BASE | (0x1F1 * Word1OrByte2)))) //Parameter for prescaler divisions - 6bit ssi low duty cycle value for prescaler
#define F2_Prescaler1_reg2 (*((volatile short *)(FPGA1_BASE | (0x1F2 * Word1OrByte2)))) //Parameter for prescaler divisions - 3bit spi temp low duty cycle value for pmw
#define F2_Prescaler1_reg3 (*((volatile short *)(FPGA1_BASE | (0x1F3 * Word1OrByte2)))) //Parameter for prescaler divisions - 3bit spi temp high duty cycle value for pmw
#define F2_Prescaler1_reg4 (*((volatile short *)(FPGA1_BASE | (0x1F4 * Word1OrByte2)))) //Parameter for prescaler divisions - 3bit spi moto low duty cycle value for pmw
#define F2_Prescaler1_reg5 (*((volatile short *)(FPGA1_BASE | (0x1F5 * Word1OrByte2)))) //Parameter for prescaler divisions - 3bit spi moto high duty cycle value for pmw
#define F2_Prescaler1_reg6 (*((volatile short *)(FPGA1_BASE | (0x1F6 * Word1OrByte2)))) //Parameter for prescaler divisions - 8bit BLOWER low duty cycle value for pmw
#define F2_Prescaler1_reg7 (*((volatile short *)(FPGA1_BASE | (0x1F7 * Word1OrByte2)))) //Parameter for prescaler divisions - 8bit BLOWER high duty cycle value for pmw
//Test
#define F2_Test (*((volatile short *)(FPGA2_BASE | (0x1F8 * Word1OrByte2)))) //Readback not - gives the inverse of the written to value
// * * * * * * * * * * * * * * * * FPGA 3 * * * * * * * * * * * * * * * * //
//Version1
#define F3_Ver1_D (*((volatile short *)(FPGA3_BASE | (0x0 * Word1OrByte2)))) //Version of Fpga is held here
//Version2
#define F3_Ver2_D (*((volatile short *)(FPGA3_BASE | (0x8 * Word1OrByte2)))) //Version of Fpga is held here
//GPI 01
#define F3_GPI_01_D (*((volatile short *)(FPGA3_BASE | (0x10 * Word1OrByte2)))) //Reads the direct values that are currently being sent to the fpga.
#define F3_GPI_01_L (*((volatile short *)(FPGA3_BASE | (0x11 * Word1OrByte2)))) //Value of the latched shorterrupts that have occurred
#define F3_GPI_01_M (*((volatile short *)(FPGA3_BASE | (0x12 * Word1OrByte2)))) //Value of the shorterrupt mask, Default is 0x0000
//MIDTANK 01
#define F3_MIDTANK_01_Direct (*((volatile short *)(FPGA3_BASE | (0x018 * Word1OrByte2)))) //Reads the direct values that are currently being sent to the fpga.
#define F3_MIDTANK_01_Latched (*((volatile short *)(FPGA3_BASE | (0x019 * Word1OrByte2)))) //Value of the latched shorterrupts that have occurred
#define F3_MIDTANK_01_Mask (*((volatile short *)(FPGA3_BASE | (0x01a * Word1OrByte2)))) //Value of the shorterrupt mask, Default is 0x0000
//MIDTANK 02
#define F3_MIDTANK_02_Direct (*((volatile short *)(FPGA3_BASE | (0x020 * Word1OrByte2)))) //Reads the direct values that are currently being sent to the fpga.
#define F3_MIDTANK_02_Latched (*((volatile short *)(FPGA3_BASE | (0x021 * Word1OrByte2)))) //Value of the latched shorterrupts that have occurred
#define F3_MIDTANK_02_Mask (*((volatile short *)(FPGA3_BASE | (0x022 * Word1OrByte2)))) //Value of the shorterrupt mask, Default is 0x0000
//DISPENSER_ROTENC_IN
#define F3_DISPENSER_ROTENC_IN_Direct (*((volatile short *)(FPGA3_BASE | (0x028 * Word1OrByte2)))) //Reads the direct values that are currently being sent to the fpga.
#define F3_DISPENSER_ROTENC_IN_Latched (*((volatile short *)(FPGA3_BASE | (0x029 * Word1OrByte2)))) //Value of the latched shorterrupts that have occurred
#define F3_DISPENSER_ROTENC_IN_Mask (*((volatile short *)(FPGA3_BASE | (0x02A * Word1OrByte2)))) //Value of the shorterrupt mask, Default is 0x0000
//Moto_Driver_NBUSY_register1
#define F3_Moto_Driver_NBUSY1_Direct (*((volatile short *)(FPGA3_BASE | (0x030 * Word1OrByte2)))) //Reads the direct values that are currently being sent to the fpga.
#define F3_Moto_Driver_NBUSY1_Latched (*((volatile short *)(FPGA3_BASE | (0x031 * Word1OrByte2)))) //Value of the latched shorterrupts that have occurred
#define F3_Moto_Driver_NBUSY1_Mask (*((volatile short *)(FPGA3_BASE | (0x032 * Word1OrByte2)))) //Value of the shorterrupt mask, Default is 0x0000
//CARTx_PRES
#define F3_CARTx_PRES_02_Direct (*((volatile short *)(FPGA3_BASE | (0x038 * Word1OrByte2)))) //Reads the direct values that are currently being sent to the fpga.
#define F3_CARTx_PRES_02_Latched (*((volatile short *)(FPGA3_BASE | (0x039 * Word1OrByte2)))) //Value of the latched shorterrupts that have occurred
#define F3_CARTx_PRES_02_Mask (*((volatile short *)(FPGA3_BASE | (0x03A * Word1OrByte2)))) //Value of the shorterrupt mask, Default is 0x0000
//LS_01
#define F3_LS_01_Direct (*((volatile short *)(FPGA3_BASE | (0x040 * Word1OrByte2)))) //Reads the direct values that are currently being sent to the fpga.
#define F3_LS_01_Latched (*((volatile short *)(FPGA3_BASE | (0x041 * Word1OrByte2)))) //Value of the latched shorterrupts that have occurred
#define F3_LS_01_Mask (*((volatile short *)(FPGA3_BASE | (0x042 * Word1OrByte2)))) //Value of the shorterrupt mask, Default is 0x0000
//Spi_Busy_01
#define F3_busy_01_Direct (*((volatile short *)(FPGA3_BASE | (0x050 * Word1OrByte2)))) //Reads the direct values that are currently being sent to the fpga.
#define F3_busy_01_Latched (*((volatile short *)(FPGA3_BASE | (0x051 * Word1OrByte2)))) //Value of the latched shorterrupts that have occurred
#define F3_busy_01_Mask (*((volatile short *)(FPGA3_BASE | (0x052 * Word1OrByte2)))) //Value of the shorterrupt mask, Default is 0x0000
//Moto_Driver_NSTBYRST_register1
#define F3_Moto_Driver_NSTBYRST1 (*((volatile short *)(FPGA3_BASE | (0x059 * Word1OrByte2)))) //Writes to values. Readback thevaluessthat are currently in the GPO register
//GPO_01
#define F3_GPO_01_bus (*((volatile short *)(FPGA3_BASE | (0x061 * Word1OrByte2)))) //Writes to values. Readback thevaluessthat are currently in the GPO register
//Moto_Driver_SW_register1
#define F3_Moto_Driver_SW1 (*((volatile short *)(FPGA3_BASE | (0x069 * Word1OrByte2)))) //Writes to values. Readback thevaluessthat are currently in the GPO register
//VALVE_OUT
#define F3_VALVE_OUT (*((volatile short *)(FPGA3_BASE | (0x071 * Word1OrByte2)))) //Writes to values. Readback thevaluessthat are currently in the GPO register
//DISPENSER_ROTENC_OUT
#define F3_DISPENSER_ROTENC_OUT (*((volatile short *)(FPGA3_BASE | (0x079 * Word1OrByte2)))) //Writes to values. Readback thevaluessthat are currently in the GPO register
//QEI_SCREW_ROTENC
#define F3_SPARE1_ROTENC_lsb (*((volatile short *)(FPGA3_BASE | (0x080 * Word1OrByte2)))) //Value of the lsb of the QEI register
#define F3_SPARE1_ROTENC_msb (*((volatile short *)(FPGA3_BASE | (0x081 * Word1OrByte2)))) //10bits Value of the Msb of the QEI register, 1bit Direction of movement, 5bits Reserved
#define F3_SPARE1_ROTENC_index (*((volatile short *)(FPGA3_BASE | (0x082 * Word1OrByte2)))) //value of index counter
//QEI_RSPARE_ROTENC
#define F3_RSPARE_ROTENC_lsb (*((volatile short *)(FPGA3_BASE | (0x088 * Word1OrByte2)))) //Value of the lsb of the QEI register
#define F3_RSPARE_ROTENC_msb (*((volatile short *)(FPGA3_BASE | (0x089 * Word1OrByte2)))) //10bits Value of the Msb of the QEI register, 1bit Direction of movement, 5bits Reserved
#define F3_RSPARE_ROTENC_index (*((volatile short *)(FPGA3_BASE | (0x08a * Word1OrByte2)))) //value of index counter
//SPI_MOTO_RLOADING_A1
#define F3_MOTO_SPARE1_1_A1_TX_00 (*((volatile short *)(FPGA3_BASE | (0x100 * Word1OrByte2)))) //The second register to be shifted out of the spi. The msb bit of this register is shifted out first.
#define F3_MOTO_SPARE1_1_A1_TX_01 (*((volatile short *)(FPGA3_BASE | (0x101 * Word1OrByte2)))) //The first register to be shifted out of the spi. The msb bit of this register is shifted out first.
#define F3_MOTO_SPARE1_1_A1_RX_00 (*((volatile short *)(FPGA3_BASE | (0x102 * Word1OrByte2)))) //The 8 msb bits of the shifted in bits. The 8 msb bits of this register are zeros.
#define F3_MOTO_SPARE1_1_A1_RX_01 (*((volatile short *)(FPGA3_BASE | (0x103 * Word1OrByte2)))) //The 16 Lsb bits of the shifted in data.
#define F3_MOTO_SPARE1_1_A1_WORDS (*((volatile short *)(FPGA1_BASE | (0x104 * Word1OrByte2)))) //The amount of spi words (usually byte sized) per transmission.
//SPI_MOTO_RDRIVING_A1
#define F3_MOTO_SPARE1_2_A1_TX_00 (*((volatile short *)(FPGA3_BASE | (0x108 * Word1OrByte2)))) //The second register to be shifted out of the spi. The msb bit of this register is shifted out first.
#define F3_MOTO_SPARE1_2_A1_TX_01 (*((volatile short *)(FPGA3_BASE | (0x109 * Word1OrByte2)))) //The first register to be shifted out of the spi. The msb bit of this register is shifted out first.
#define F3_MOTO_SPARE1_2_A1_RX_00 (*((volatile short *)(FPGA3_BASE | (0x10A * Word1OrByte2)))) //The 8 msb bits of the shifted in bits. The 8 msb bits of this register are zeros.
#define F3_MOTO_SPARE1_2_A1_RX_01 (*((volatile short *)(FPGA3_BASE | (0x10B * Word1OrByte2)))) //The 16 Lsb bits of the shifted in data.
#define F3_MOTO_SPARE1_2_A1_WORDS (*((volatile short *)(FPGA1_BASE | (0x10C * Word1OrByte2)))) //The amount of spi words (usually byte sized) per transmission.
//SPI_F1_MOTO_LDRIVING_A1
#define F3_MOTO_SPARE2_1_A1_TX_00 (*((volatile short *)(FPGA3_BASE | (0x110 * Word1OrByte2)))) //The second register to be shifted out of the spi. The msb bit of this register is shifted out first.
#define F3_MOTO_SPARE2_1_A1_TX_01 (*((volatile short *)(FPGA3_BASE | (0x111 * Word1OrByte2)))) //The first register to be shifted out of the spi. The msb bit of this register is shifted out first.
#define F3_MOTO_SPARE2_1_A1_RX_00 (*((volatile short *)(FPGA3_BASE | (0x112 * Word1OrByte2)))) //The 8 msb bits of the shifted in bits. The 8 msb bits of this register are zeros.
#define F3_MOTO_SPARE2_1_A1_RX_01 (*((volatile short *)(FPGA3_BASE | (0x113 * Word1OrByte2)))) //The 16 Lsb bits of the shifted in data.
#define F3_MOTO_SPARE2_1_A1_WORDS (*((volatile short *)(FPGA1_BASE | (0x114 * Word1OrByte2)))) //The amount of spi words (usually byte sized) per transmission.
//SPI_F1_MOTO_LLOADING_A1
#define F3_MOTO_SPARE2_2_A1_TX_00 (*((volatile short *)(FPGA3_BASE | (0x118 * Word1OrByte2)))) //The second register to be shifted out of the spi. The msb bit of this register is shifted out first.
#define F3_MOTO_SPARE2_2_A1_TX_01 (*((volatile short *)(FPGA3_BASE | (0x119 * Word1OrByte2)))) //The first register to be shifted out of the spi. The msb bit of this register is shifted out first.
#define F3_MOTO_SPARE2_2_A1_RX_00 (*((volatile short *)(FPGA3_BASE | (0x11A * Word1OrByte2)))) //The 8 msb bits of the shifted in bits. The 8 msb bits of this register are zeros.
#define F3_MOTO_SPARE2_2_A1_RX_01 (*((volatile short *)(FPGA3_BASE | (0x11B * Word1OrByte2)))) //The 16 Lsb bits of the shifted in data.
#define F3_MOTO_SPARE2_2_A1_WORDS (*((volatile short *)(FPGA1_BASE | (0x11C * Word1OrByte2)))) //The amount of spi words (usually byte sized) per transmission.
#define F3_MOTO_SPARE3_1_A1_TX_00 (*((volatile short *)(FPGA3_BASE | (0x120 * Word1OrByte2)))) //The second register to be shifted out of the spi. The msb bit of this register is shifted out first.
#define F3_MOTO_SPARE3_1_A1_TX_01 (*((volatile short *)(FPGA3_BASE | (0x120 * Word1OrByte2)))) //The first register to be shifted out of the spi. The msb bit of this register is shifted out first.
#define F3_MOTO_SPARE3_1_A1_RX_00 (*((volatile short *)(FPGA3_BASE | (0x122 * Word1OrByte2)))) //The 8 msb bits of the shifted in bits. The 8 msb bits of this register are zeros.
#define F3_MOTO_SPARE3_1_A1_RX_01 (*((volatile short *)(FPGA3_BASE | (0x123 * Word1OrByte2)))) //The 16 Lsb bits of the shifted in data.
#define F3_MOTO_SPARE3_1_A1_WORDS (*((volatile short *)(FPGA1_BASE | (0x124 * Word1OrByte2)))) //The amount of spi words (usually byte sized) per transmission.
//SSI
#define F3_SPARE1_ROTENC_DATA_p_1_RX_msb (*((volatile short *)(FPGA3_BASE | (0x160 * Word1OrByte2)))) //16 bit MSB if nessesary
#define F3_SPARE1_ROTENC_DATA_p_1_RX_lsb (*((volatile short *)(FPGA3_BASE | (0x161 * Word1OrByte2)))) //The 16 Lsb bits of the shifted in data.
#define F3_SPARE1_ROTENC_DATA_p_1_TX (*((volatile short *)(FPGA3_BASE | (0x167 * Word1OrByte2)))) //This register triggers a TX transmission
#define F3_SPARE2_ROTENC_DATA_p_2_RX_msb (*((volatile short *)(FPGA3_BASE | (0x168 * Word1OrByte2)))) //16 bit MSB if nessesary
#define F3_SPARE2_ROTENC_DATA_p_2_RX_lsb (*((volatile short *)(FPGA3_BASE | (0x169 * Word1OrByte2)))) //The 16 Lsb bits of the shifted in data.
#define F3_SPARE2_ROTENC_DATA_p_1_TX (*((volatile short *)(FPGA3_BASE | (0x16F * Word1OrByte2)))) //This register triggers a TX transmission
#define F3_SW_RESET_reg (*((volatile short *)(FPGA3_BASE | (0x1E8 * Word1OrByte2)))) //This register resets the MCU
//Prescaler
#define F3_Prescaler1_reg1 (*((volatile short *)(FPGA3_BASE | (0x1F0 * Word1OrByte2)))) //Parameter for prescaler divisions - 6bit ssi high duty cycle value for prescale
#define F3_Prescaler1_reg2 (*((volatile short *)(FPGA3_BASE | (0x1F1 * Word1OrByte2)))) //Parameter for prescaler divisions - 6bit ssi low duty cycle value for prescaler
#define F3_Prescaler1_reg3 (*((volatile short *)(FPGA3_BASE | (0x1F2 * Word1OrByte2)))) //Parameter for prescaler divisions - 3bit spi moto low duty cycle value for pmw
#define F3_Prescaler1_reg4 (*((volatile short *)(FPGA3_BASE | (0x1F3 * Word1OrByte2)))) //Parameter for prescaler divisions - 3bit spi moto high duty cycle value for pmw
#define F3_Prescaler1_reg5 (*((volatile short *)(FPGA3_BASE | (0x1F4 * Word1OrByte2)))) //Parameter for prescaler divisions
#define F3_Prescaler1_reg6 (*((volatile short *)(FPGA3_BASE | (0x1F5 * Word1OrByte2)))) //Parameter for prescaler divisions
#define F3_Prescaler1_reg7 (*((volatile short *)(FPGA3_BASE | (0x1F6 * Word1OrByte2)))) //Parameter for prescaler divisions
#define F3_Prescaler1_reg8 (*((volatile short *)(FPGA3_BASE | (0x1F7 * Word1OrByte2)))) //Parameter for prescaler divisions
//Test
#define F3_Test (*((volatile short *)(FPGA3_BASE | (0x1F8 * Word1OrByte2)))) //Readback not - gives the inverse of the written to value
//1 Version1_Direct
typedef union
{
struct
{
unsigned char Month; //0-7
unsigned char Day; //8-15
}bytes;
unsigned short ushort;
}VER1;
//4 Version2_Direct
typedef union
{
struct
{
unsigned char Ver_num; //0-7
unsigned char Year; //8-15
}bytes;
unsigned short ushort;
}VER2;
//16 Moto_Driver_NBUSY_register1
typedef union
{
struct
{
bool F1_MOTO_LPIVOT1_A1_NBUSY : 1; //0
bool F1_MOTO_LLOADING_A1_NBUSY : 1; //1
bool F1_MOTO_LDRIVING_A1_NBUSY : 1; //2
bool F1_MOTO_LDANCER2_A1_NBUSY : 1; //3
bool F1_MOTO_LDANCER1_A1_NBUSY : 1; //4
bool F1_MOTO_DRYER_LOADARM_A1_NBUSY : 1; //5
bool F1_MOTO_DRYER_LID_A1_NBUSY : 1; //6
bool F1_MOTO_DRYER_DRIVING_A1_NBUSY : 1; //7
bool F1_MOTO_DH_LID_A1_NBUSY : 1; //8
bool F1_MOTO_DH_CLEANMECH_A1_NBUSY : 1; //9
bool F1_MOTO_DH_CLEANHEAD_A1_NBUSY : 1; //10
unsigned char RESERVE:5; //11-15
}bits;
unsigned short ushort;
}Mot_NBUSY1;
//19 Moto_Driver_NBUSY_register2
typedef union
{
struct
{
bool F1_MOTO_WINDER_A1_NBUSY : 1; //0
bool F1_MOTO_SCREW_A1_NBUSY : 1; //1
bool F1_MOTO_RLOADING_A1_NBUSY : 1; //2
bool F1_MOTO_RLOADARM_A1_NBUSY : 1; //3
bool F1_MOTO_RDRIVING_A1_NBUSY : 1; //4
bool F1_MOTO_RDANCER_A1_NBUSY : 1; //5
unsigned char RESERVE1 : 2; // 6-7
unsigned char RESERVE2; // 8-15
}bits;
unsigned short ushort;
}Mot_NBUSY2;
//29 + 32 SPI_Busy_register1 + SPI_Busy_register2
typedef union
{
struct
{
unsigned char SPI_Busy_1_D;
unsigned char SPI_Busy_2_D;
}ushort;
unsigned int uint;
}SPI_BUSY;
//35 Moto_Driver_NSTBYRST1
typedef union
{
struct
{
bool LPIVOT1 : 1; //0
bool LLOADING : 1; //1
bool LDRIVING : 1; //2
bool LDANCER2 : 1; //3
bool LDANCER1 : 1; //4
bool DRYER_LOADARM : 1; //5
bool DRYER_LID : 1; //6
bool DRYER_DRIVING : 1; //7
bool DH_LID : 1; //8
bool DH_CLEANMECH : 1; //9
bool DH_CLEANHEAD : 1; //10
unsigned char RESERVE:5; //11-15
}bits;
unsigned short ushort;
}MOT_NSTBYRST1;
//36 Moto_Driver_NSTBYRST2
typedef union
{
struct
{
bool WINDER : 1; //0
bool SCREW : 1; //1
bool RLOADING : 1; //2
bool RLOADARM : 1; //3
bool RDRIVING : 1; //4
bool RDANCER : 1; //5
unsigned char RESERVE1:2; // 6-7
unsigned char RESERVE2; // 8-15
}bits;
unsigned short ushort;
}MOT_NSTBYRST2;
//37 Moto_Driver_SW_register1 - Moto_Driver_SW1
typedef union
{
struct
{
bool LPIVOT1 : 1; //0
bool LLOADING : 1; //1
bool LDRIVING : 1; //2
bool LDANCER2 : 1; //3
bool LDANCER1 : 1; //4
bool DRYER_LOADARM : 1; //5
bool DRYER_LID : 1; //6
bool DRYER_DRIVING; //7
bool DH_LID : 1; //8
bool DH_CLEANMECH : 1; //9
bool DH_CLEANHEAD : 1; //10
bool GPO_TFEED_BREAK_1 : 1; //11
bool GPO_TFEED_BREAK_2 : 1; //12
unsigned char RESERVE:3; // 13-15
}bits;
unsigned short ushort;
}MOT_SW1;
//38 Moto_Driver_SW_register2 - Moto_Driver_SW2
typedef union
{
struct
{
bool F1_MOTO_WINDER_A1_SW : 1; //0
bool F1_MOTO_SCREW_A1_SW : 1; //1
bool F1_MOTO_RLOADING_A1_SW : 1; //2
bool F1_MOTO_RLOADARM_A1_SW : 1; //3
bool F1_MOTO_RDRIVING_A1_SW : 1; //4
bool F1_MOTO_RDANCER_A1_SW : 1; //5
unsigned char RESERVE1:2; // 6-7
unsigned char RESERVE2; // 8-15
}bits;
unsigned short ushort;
}MOT_SW2;
//308 GPO_01
typedef union
{
struct
{
bool F3_GPO_LED4 : 1; //0
bool F3_GPO_LED3 : 1; //1
bool F3_GPO_LED2 : 1; //2
bool F3_GPO_LED1 : 1; //3
bool F3_GPO_EXTWINDER_SSR11_CTRL : 1; //4
bool F3_GPO_BUZZER : 1; //4
bool F3_SPARE2_ROTENC_CLK : 1; //6
bool F3_SPARE1_ROTENC_CLK : 1; //7
unsigned char RESERVE; // 8-15
}bits;
unsigned short ushort;
}GP_Out_01;
//------------------------------ MOTOR DRIVER L_6470 ------------------------------
typedef union
{
struct
{
unsigned short LSB;
unsigned short MSB;
}ushort;
unsigned int uint;
}INT2SHORT;//16->32
enum
{
RLOADING,
RDRIVING,
F1_LDRIVING,
F1_LLOADING,
F1_DRYER_LOADARM,
F1_DRYER_DRIVING,
F1_DH_CLEANHEAD,
F1_DH_CLEANMECH,
F1_SCREW,
F1_WINDER,
RLOADARM,
RDANCER,
LDANCER1,
LDANCER2,
DRYER_LID,
DH_LID,
LPIVOT1,
}SPI_TYPE;
//SPI
typedef struct //S_SPI
{
unsigned char Type;
unsigned int TX_MOSI; //32bit (Master Output Slave Input )
unsigned int RX_MISO; //24bit (Master Input Slave Output)
//unsigned int BUSY; //32bit
}SPI;//SPI
/*
#define L6470_MOSI (*((volatile short *)(BASE | 0x0100)))
#define L6470_MISO (*((volatile short *)(BASE | 0x0200)))
#define L6470_CS (*((volatile short *)(BASE | 0x0300)))
#define L6470_CLK (*((volatile short *)(BASE | 0x0400)))
#define L6470_BUSY (*((volatile short *)(BASE | 0x0500)))
#define L6470_RESET (*((volatile short *)(BASE | 0x0600)))
#define L6470_TX (*((volatile char *)(BASE | 0x0700)))
#define L6470_RX (*((volatile char *)(BASE | 0x0800)))
*/
//L6470_MOSI = 0x00;
|