CC26xx Driver Library |

- Main Page
- Related Pages
- CC26xx APIs
- Register Descriptions
- Online Resources

All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
adi.h
Go to the documentation of this file.
1 /******************************************************************************
2 * Filename: adi.h
3 * Revised: 2015-01-14 12:12:44 +0100 (on, 14 jan 2015)
4 * Revision: 42373
5 *
6 * Description: Defines and prototypes for the ADI master interface.
7 *
8 * Copyright (c) 2015, Texas Instruments Incorporated
9 * All rights reserved.
10 *
11 * Redistribution and use in source and binary forms, with or without
12 * modification, are permitted provided that the following conditions are met:
13 *
14 * 1) Redistributions of source code must retain the above copyright notice,
15 * this list of conditions and the following disclaimer.
16 *
17 * 2) Redistributions in binary form must reproduce the above copyright notice,
18 * this list of conditions and the following disclaimer in the documentation
19 * and/or other materials provided with the distribution.
20 *
21 * 3) Neither the name of the ORGANIZATION nor the names of its contributors may
22 * be used to endorse or promote products derived from this software without
23 * specific prior written permission.
24 *
25 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
26 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
27 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
28 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
29 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
30 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
31 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
32 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
33 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
34 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
35 * POSSIBILITY OF SUCH DAMAGE.
36 *
37 ******************************************************************************/
38
39 //*****************************************************************************
40 //
43 //
44 //*****************************************************************************
45
46 #ifndef __ADI_H__
47 #define __ADI_H__
48
49 //*****************************************************************************
50 //
51 // If building with a C++ compiler, make all of the definitions in this header
52 // have a C binding.
53 //
54 //*****************************************************************************
55 #ifdef __cplusplus
56 extern "C"
57 {
58 #endif
59
60 #include <stdbool.h>
61 #include <stdint.h>
62 #include <inc/hw_types.h>
63 #include <inc/hw_uart.h>
64 #include <inc/hw_memmap.h>
65 #include <inc/hw_ints.h>
66 #include <inc/hw_adi.h>
67 #include <driverlib/debug.h>
68 #include <driverlib/ddi.h>
69
70 //*****************************************************************************
71 //
72 // Number of registers in the ADI slave
73 //
74 //*****************************************************************************
75 #define ADI_SLAVE_REGS 16
76
77 //*****************************************************************************
78 //
79 // Defines that can be passed to the ADIConfigSet()
80 //
81 //*****************************************************************************
82 #define ADI_NO_WAIT 0x00000000
83 #define ADI_WAIT_FOR_ACK 0x00000004
84 #define ADI_SPEED_2 0x00000000
85 #define ADI_SPEED_4 0x00000001
86 #define ADI_SPEED_8 0x00000002
87 #define ADI_SPEED_16 0x00000003
88 #define ADI_CONFIG_MASK 0x00000007
89
90 //*****************************************************************************
91 //
92 // Defines that is used to control the ADI slave and master
93 //
94 //*****************************************************************************
95 #define ADI_PROTECT 0x00000080
96 #define ADI_ACK 0x00000001
97 #define ADI_SYNC 0x00000000
98
99 //*****************************************************************************
100 //
101 // API Functions and prototypes
102 //
103 //*****************************************************************************
104
105 #ifdef DRIVERLIB_DEBUG
106 //*****************************************************************************
107 //
117 //
118 //*****************************************************************************
119 static bool
120 ADIBaseValid(uint32_t ui32Base)
121 {
122 return(ui32Base == ADI2_BASE || ui32Base == ADI3_BASE ||
123 ui32Base == AUX_ADI4_BASE);
124 }
125 #endif
126
127 //*****************************************************************************
128 //
140 //
141 //*****************************************************************************
142 __STATIC_INLINE uint32_t
143 ADIStatusGet(uint32_t ui32Base)
144 {
145 //
146 // Check the arguments.
147 //
148 ASSERT(ADIBaseValid(ui32Base));
149
150 //
151 // Return the status value for the correct ADI Slave.
152 //
153 return(HWREG(ui32Base + ADI_O_SLAVESTAT));
154 }
155
156 //*****************************************************************************
157 //
184 //
185 //*****************************************************************************
186 __STATIC_INLINE void
187 ADIConfigSet(uint32_t ui32Base, uint32_t ui32Config, bool bProtect)
188 {
189 //
190 // Check the arguments.
191 //
192 ASSERT(ADIBaseValid(ui32Base));
193 ASSERT(((ui32Config & 0x4) == ADI_NO_WAIT) ||
194 ((ui32Config & 0x4) == ADI_WAIT_FOR_ACK));
195 ASSERT(((ui32Config & 0x3) == ADI_SPEED_2) ||
196 ((ui32Config & 0x3) == ADI_SPEED_4) ||
197 ((ui32Config & 0x3) == ADI_SPEED_8) ||
198 ((ui32Config & 0x3) == ADI_SPEED_16));
199
200 //
201 // Configure the ADI slave.
202 //
203 if (ui32Base==AUX_ADI4_BASE) {
204 AuxAdiDdiSafeWrite(
205 ui32Base + ADI_O_SLAVECONF,
206 (ui32Config & 0x7) | (bProtect ? ADI_PROTECT : 0),
207 4
208 );
209 } else {
210 HWREG(ui32Base + ADI_O_SLAVECONF) = (ui32Config & 0x7) |
211 (bProtect ? ADI_PROTECT : 0);
212 }
213 }
214
215 //*****************************************************************************
216 //
233 //
234 //*****************************************************************************
235 __STATIC_INLINE void
236 ADISync(uint32_t ui32Base)
237 {
238 //
239 // Check the arguments.
240 //
241 ASSERT(ADIBaseValid(ui32Base));
242
243 //
244 // Synchronize the ADI slave to guarantee future write operations.
245 //
246 if (ui32Base==AUX_ADI4_BASE) {
247 AuxAdiDdiSafeWrite(ui32Base + ADI_O_SLAVESTAT, ADI_SYNC, 1);
248 } else {
249 HWREGB(ui32Base + ADI_O_SLAVESTAT) = ADI_SYNC;
250 }
251 }
252
253 //*****************************************************************************
254 //
275 //
276 //*****************************************************************************
277 __STATIC_INLINE void
278 ADIProtect(uint32_t ui32Base)
279 {
280 uint32_t ui32Val;
281
282 //
283 // Check the arguments.
284 //
285 ASSERT(ADIBaseValid(ui32Base));
286
287 //
288 // Lock the register interface on the ADI slave.
289 //
290 if (ui32Base==AUX_ADI4_BASE) {
291 ui32Val = AuxAdiDdiSafeRead(ui32Base + ADI_O_SLAVECONF, 4);
292 } else {
293 ui32Val = HWREG(ui32Base + ADI_O_SLAVECONF);
294 }
295 ui32Val |= ADI_PROTECT;
296 if (ui32Base==AUX_ADI4_BASE) {
297 AuxAdiDdiSafeWrite(ui32Base + ADI_O_SLAVECONF, ui32Val, 4);
298 } else {
299 HWREG(ui32Base + ADI_O_SLAVECONF) = ui32Val;
300 }
301 }
302
303 //*****************************************************************************
304 //
328 //
329 //*****************************************************************************
330 __STATIC_INLINE void
331 ADI8RegWrite(uint32_t ui32Base, uint32_t ui32Reg, uint8_t ui8Val)
332 {
333 //
334 // Check the arguments.
335 //
336 ASSERT(ADIBaseValid(ui32Base));
337 ASSERT(ui32Reg < ADI_SLAVE_REGS);
338
339 //
340 // Write the value to the register.
341 //
342 if (ui32Base==AUX_ADI4_BASE) {
343 AuxAdiDdiSafeWrite(ui32Base + ui32Reg, ui8Val, 1);
344 } else {
345 HWREGB(ui32Base + ui32Reg) = ui8Val;
346 }
347 }
348
349 //*****************************************************************************
350 //
377 //
378 //*****************************************************************************
379 __STATIC_INLINE void
380 ADI16RegWrite(uint32_t ui32Base, uint32_t ui32Reg,
381 uint16_t ui16Val)
382 {
383 //
384 // Check the arguments.
385 //
386 ASSERT(ADIBaseValid(ui32Base));
387 ASSERT(ui32Reg < ADI_SLAVE_REGS);
388
389 //
390 // Write the value to the register.
391 //
392 if (ui32Base==AUX_ADI4_BASE) {
393 AuxAdiDdiSafeWrite(ui32Base + (ui32Reg & 0xFE), ui16Val, 2);
394 } else {
395 HWREGH(ui32Base + (ui32Reg & 0xFE)) = ui16Val;
396 }
397 }
398
399 //*****************************************************************************
400 //
427 //
428 //*****************************************************************************
429 __STATIC_INLINE void
430 ADI32RegWrite(uint32_t ui32Base, uint32_t ui32Reg, uint32_t ui32Val)
431 {
432 //
433 // Check the arguments.
434 //
435 ASSERT(ADIBaseValid(ui32Base));
436 ASSERT(ui32Reg < ADI_SLAVE_REGS);
437
438 //
439 // Write the value to the register.
440 //
441 if (ui32Base==AUX_ADI4_BASE) {
442 AuxAdiDdiSafeWrite(ui32Base + (ui32Reg & 0xFC), ui32Val, 4);
443 } else {
444 HWREG(ui32Base + (ui32Reg & 0xFC)) = ui32Val;
445 }
446 }
447
448 //*****************************************************************************
449 //
467 //
468 //*****************************************************************************
469 __STATIC_INLINE uint32_t
470 ADI8RegRead(uint32_t ui32Base, uint32_t ui32Reg)
471 {
472 //
473 // Check the arguments.
474 //
475 ASSERT(ADIBaseValid(ui32Base));
476 ASSERT(ui32Reg < ADI_SLAVE_REGS);
477
478 //
479 // Read the register and return the value.
480 //
481 if (ui32Base==AUX_ADI4_BASE) {
482 return AuxAdiDdiSafeRead(ui32Base + ui32Reg, 1);
483 } else {
484 return(HWREGB(ui32Base + ui32Reg));
485 }
486 }
487
488 //*****************************************************************************
489 //
510 //
511 //*****************************************************************************
512 __STATIC_INLINE uint32_t
513 ADI16RegRead(uint32_t ui32Base, uint32_t ui32Reg)
514 {
515 //
516 // Check the arguments.
517 //
518 ASSERT(ADIBaseValid(ui32Base));
519 ASSERT(ui32Reg < ADI_SLAVE_REGS);
520
521 //
522 // Read the registers and return the value.
523 //
524 if (ui32Base==AUX_ADI4_BASE) {
525 return AuxAdiDdiSafeRead(ui32Base + (ui32Reg & 0xFE), 2);
526 } else {
527 return(HWREGH(ui32Base + (ui32Reg & 0xFE)));
528 }
529 }
530
531 //*****************************************************************************
532 //
551 //
552 //*****************************************************************************
553 __STATIC_INLINE uint32_t
554 ADI32RegRead(uint32_t ui32Base, uint32_t ui32Reg)
555 {
556 //
557 // Check the arguments.
558 //
559 ASSERT(ADIBaseValid(ui32Base));
560 ASSERT(ui32Reg < ADI_SLAVE_REGS);
561
562 //
563 // Read the registers and return the value.
564 //
565 if (ui32Base==AUX_ADI4_BASE) {
566 return AuxAdiDdiSafeRead(ui32Base + (ui32Reg & 0xFC), 4);
567 } else {
568 return(HWREG(ui32Base + (ui32Reg & 0xFC)));
569 }
570 }
571
572 //*****************************************************************************
573 //
600 //
601 //*****************************************************************************
602 __STATIC_INLINE void
603 ADI8BitsSet(uint32_t ui32Base, uint32_t ui32Reg, uint8_t ui8Val)
604 {
605 uint32_t ui32RegOffset;
606
607 //
608 // Check the arguments.
609 //
610 ASSERT(ADIBaseValid(ui32Base));
611 ASSERT(ui32Reg < ADI_SLAVE_REGS);
612
613 //
614 // Get the correct address of the first register used for setting bits
615 // in the ADI slave.
616 //
617 ui32RegOffset = ADI_O_SET;
618
619 //
620 // Set the selected bits.
621 //
622 if (ui32Base==AUX_ADI4_BASE) {
623 AuxAdiDdiSafeWrite(ui32Base + ui32RegOffset + ui32Reg, ui8Val, 4);
624 } else {
625 HWREGB(ui32Base + ui32RegOffset + ui32Reg) = ui8Val;
626 }
627 }
628
629 //*****************************************************************************
630 //
657 //
658 //*****************************************************************************
659 __STATIC_INLINE void
660 ADI16BitsSet(uint32_t ui32Base, uint32_t ui32Reg, uint16_t ui16Val)
661 {
662 uint32_t ui32RegOffset;
663
664 //
665 // Check the arguments.
666 //
667 ASSERT(ADIBaseValid(ui32Base));
668 ASSERT(ui32Reg < ADI_SLAVE_REGS);
669
670 //
671 // Get the correct address of the first register used for setting bits
672 // in the ADI slave.
673 //
674 ui32RegOffset = ADI_O_SET;
675
676 //
677 // Set the selected bits.
678 //
679 if (ui32Base==AUX_ADI4_BASE) {
680 AuxAdiDdiSafeWrite(ui32Base + ui32RegOffset + (ui32Reg & 0xFE), ui16Val, 2);
681 } else {
682 HWREGH(ui32Base + ui32RegOffset + (ui32Reg & 0xFE)) = ui16Val;
683 }
684 }
685
686 //*****************************************************************************
687 //
714 //
715 //*****************************************************************************
716 __STATIC_INLINE void
717 ADI32BitsSet(uint32_t ui32Base, uint32_t ui32Reg, uint32_t ui32Val)
718 {
719 uint32_t ui32RegOffset;
720
721 //
722 // Check the arguments.
723 //
724 ASSERT(ADIBaseValid(ui32Base));
725 ASSERT(ui32Reg < ADI_SLAVE_REGS);
726
727 //
728 // Get the correct address of the first register used for setting bits
729 // in the ADI slave.
730 //
731 ui32RegOffset = ADI_O_SET;
732
733 //
734 // Set the selected bits.
735 //
736 if (ui32Base==AUX_ADI4_BASE) {
737 AuxAdiDdiSafeWrite(ui32Base + ui32RegOffset + (ui32Reg & 0xFC), ui32Val, 4);
738 } else {
739 HWREG(ui32Base + ui32RegOffset + (ui32Reg & 0xFC)) = ui32Val;
740 }
741 }
742
743 //*****************************************************************************
744 //
771 //
772 //*****************************************************************************
773 __STATIC_INLINE void
774 ADI8BitsClear(uint32_t ui32Base, uint32_t ui32Reg, uint8_t ui8Val)
775 {
776 uint32_t ui32RegOffset;
777
778 //
779 // Check the arguments.
780 //
781 ASSERT(ADIBaseValid(ui32Base));
782 ASSERT(ui32Reg < ADI_SLAVE_REGS);
783
784 //
785 // Get the correct address of the first register used for setting bits
786 // in the ADI slave.
787 //
788 ui32RegOffset = ADI_O_CLR;
789
790 //
791 // Set the selected bits.
792 //
793 if (ui32Base==AUX_ADI4_BASE) {
794 AuxAdiDdiSafeWrite(ui32Base + ui32RegOffset + ui32Reg, ui8Val, 1);
795 } else {
796 HWREGB(ui32Base + ui32RegOffset + ui32Reg) = ui8Val;
797 }
798 }
799
800 //*****************************************************************************
801 //
828 //
829 //*****************************************************************************
830 __STATIC_INLINE void
831 ADI16BitsClear(uint32_t ui32Base, uint32_t ui32Reg, uint16_t ui16Val)
832 {
833 uint32_t ui32RegOffset;
834
835 //
836 // Check the arguments.
837 //
838 ASSERT(ADIBaseValid(ui32Base));
839 ASSERT(ui32Reg < ADI_SLAVE_REGS);
840
841 //
842 // Get the correct address of the first register used for setting bits
843 // in the ADI slave.
844 //
845 ui32RegOffset = ADI_O_CLR;
846
847 //
848 // Set the selected bits.
849 //
850 if (ui32Base==AUX_ADI4_BASE) {
851 AuxAdiDdiSafeWrite(ui32Base + ui32RegOffset + (ui32Reg & 0xFE), ui16Val, 2);
852 } else {
853 HWREGH(ui32Base + ui32RegOffset + (ui32Reg & 0xFE)) = ui16Val;
854 }
855 }
856
857 //*****************************************************************************
858 //
885 //
886 //*****************************************************************************
887 __STATIC_INLINE void
888 ADI32BitsClear(uint32_t ui32Base, uint32_t ui32Reg, uint32_t ui32Val)
889 {
890 uint32_t ui32RegOffset;
891
892 //
893 // Check the arguments.
894 //
895 ASSERT(ADIBaseValid(ui32Base));
896 ASSERT(ui32Reg < ADI_SLAVE_REGS);
897
898 //
899 // Get the correct address of the first register used for setting bits
900 // in the ADI slave.
901 //
902 ui32RegOffset = ADI_O_CLR;
903
904 //
905 // Set the selected bits.
906 //
907 if (ui32Base==AUX_ADI4_BASE) {
908 AuxAdiDdiSafeWrite(ui32Base + ui32RegOffset + (ui32Reg & 0xFC), ui32Val, 4);
909 } else {
910 HWREG(ui32Base + ui32RegOffset + (ui32Reg & 0xFC)) = ui32Val;
911 }
912 }
913
914 //*****************************************************************************
915 //
945 //
946 //*****************************************************************************
947 __STATIC_INLINE void
948 ADI4SetValBit(uint32_t ui32Base, uint32_t ui32Reg, bool bWriteHigh,
949 uint8_t ui8Mask, uint8_t ui8Val)
950 {
951 uint32_t ui32RegOffset;
952
953 //
954 // Check the arguments.
955 //
956 ASSERT(ADIBaseValid(ui32Base));
957 ASSERT(ui32Reg < ADI_SLAVE_REGS);
958 ASSERT(!(ui8Val & 0xF0));
959 ASSERT(!(ui8Mask & 0xF0));
960
961 //
962 // Get the correct address of the first register used for setting bits
963 // in the ADI slave.
964 //
965 ui32RegOffset = ADI_O_MASK4B + (ui32Reg << 1) + (bWriteHigh ? 1 : 0);
966
967 //
968 // Set the selected bits.
969 //
970 if (ui32Base==AUX_ADI4_BASE) {
971 AuxAdiDdiSafeWrite(ui32Base + ui32RegOffset, (ui8Mask << 4) | ui8Val, 1);
972 } else {
973 HWREGB(ui32Base + ui32RegOffset) = (ui8Mask << 4) | ui8Val;
974 }
975 }
976
977 //*****************************************************************************
978 //
1003 //
1004 //*****************************************************************************
1005 __STATIC_INLINE void
1006 ADI8SetValBit(uint32_t ui32Base, uint32_t ui32Reg, uint16_t ui16Mask,
1007 uint16_t ui16Val)
1008 {
1009 uint32_t ui32RegOffset;
1010
1011 //
1012 // Check the arguments.
1013 //
1014 ASSERT(ADIBaseValid(ui32Base));
1015 ASSERT(ui32Reg < ADI_SLAVE_REGS);
1016 ASSERT(!(ui16Val & 0xFF00));
1017 ASSERT(!(ui16Mask & 0xFF00));
1018
1019 //
1020 // Get the correct address of the first register used for setting bits
1021 // in the ADI slave.
1022 //
1023 ui32RegOffset = ADI_O_MASK8B + (ui32Reg << 1);
1024
1025 //
1026 // Set the selected bits.
1027 //
1028 if (ui32Base==AUX_ADI4_BASE) {
1029 AuxAdiDdiSafeWrite(ui32Base + ui32RegOffset, (ui16Mask << 8) | ui16Val, 2);
1030 } else {
1031 HWREGH(ui32Base + ui32RegOffset) = (ui16Mask << 8) | ui16Val;
1032 }
1033 }
1034
1035 //*****************************************************************************
1036 //
1062 //
1063 //*****************************************************************************
1064 __STATIC_INLINE void
1065 ADI16SetValBit(uint32_t ui32Base, uint32_t ui32Reg, uint32_t ui32Mask,
1066 uint32_t ui32Val)
1067 {
1068 uint32_t ui32RegOffset;
1069
1070 //
1071 // Check the arguments.
1072 //
1073 ASSERT(ADIBaseValid(ui32Base));
1074 ASSERT(ui32Reg < ADI_SLAVE_REGS);
1075 ASSERT(!(ui32Val & 0xFFFF0000));
1076 ASSERT(!(ui32Mask & 0xFFFF0000));
1077
1078 //
1079 // Get the correct address of the first register used for setting bits
1080 // in the ADI slave.
1081 //
1082 ui32RegOffset = ADI_O_MASK16B + ((ui32Reg << 1) & 0xFC);
1083
1084 //
1085 // Set the selected bits.
1086 //
1087 if (ui32Base==AUX_ADI4_BASE) {
1088 AuxAdiDdiSafeWrite(ui32Base + ui32RegOffset, (ui32Mask << 16) | ui32Val, 4);
1089 } else {
1090 HWREG(ui32Base + ui32RegOffset) = (ui32Mask << 16) | ui32Val;
1091 }
1092 }
1093
1094 //*****************************************************************************
1095 //
1096 // Mark the end of the C bindings section for C++ compilers.
1097 //
1098 //*****************************************************************************
1099 #ifdef __cplusplus
1100 }
1101 #endif
1102
1103 #endif // __ADI_H__
1104
1105 //*****************************************************************************
1106 //
1109 //
1110 //*****************************************************************************
ADISync
__STATIC_INLINE void ADISync(uint32_t ui32Base)
Synchronize the ADI slave.
Definition: adi.h:236
ADI16RegWrite
__STATIC_INLINE void ADI16RegWrite(uint32_t ui32Base, uint32_t ui32Reg, uint16_t ui16Val)
Write a 16 bit value to 2 registers in the ADI slave.
Definition: adi.h:380
ADIStatusGet
__STATIC_INLINE uint32_t ADIStatusGet(uint32_t ui32Base)
Get the status of an ADI module.
Definition: adi.h:143
ADI32RegWrite
__STATIC_INLINE void ADI32RegWrite(uint32_t ui32Base, uint32_t ui32Reg, uint32_t ui32Val)
Write a 32 bit value to 4 registers in the ADI slave.
Definition: adi.h:430
debug.h
AuxAdiDdiSafeRead
__STATIC_INLINE uint32_t AuxAdiDdiSafeRead(uint32_t nAddr, uint32_t nSize)
Definition: ddi.h:187
ADI_SYNC
#define ADI_SYNC
Definition: adi.h:97
ADIProtect
__STATIC_INLINE void ADIProtect(uint32_t ui32Base)
Protect an ADI slave configuration by locking the configuration register access.
Definition: adi.h:278
ADI8BitsClear
__STATIC_INLINE void ADI8BitsClear(uint32_t ui32Base, uint32_t ui32Reg, uint8_t ui8Val)
Clear specific bits in an 8 bit ADI register.
Definition: adi.h:774
ASSERT
#define ASSERT(expr)
Definition: debug.h:65
ADI_SPEED_2
#define ADI_SPEED_2
Definition: adi.h:84
ADI16RegRead
__STATIC_INLINE uint32_t ADI16RegRead(uint32_t ui32Base, uint32_t ui32Reg)
Read the value in a 16 bit register.
Definition: adi.h:513
ADI_SPEED_8
#define ADI_SPEED_8
Definition: adi.h:86
ADI_SPEED_4
#define ADI_SPEED_4
Definition: adi.h:85
ADI32BitsClear
__STATIC_INLINE void ADI32BitsClear(uint32_t ui32Base, uint32_t ui32Reg, uint32_t ui32Val)
Clear specific bits in four 8 bit ADI register.
Definition: adi.h:888
ADI8SetValBit
__STATIC_INLINE void ADI8SetValBit(uint32_t ui32Base, uint32_t ui32Reg, uint16_t ui16Mask, uint16_t ui16Val)
Set a value on any bits inside an 8 bit register in the ADI slave.
Definition: adi.h:1006
ddi.h
ADI8RegRead
__STATIC_INLINE uint32_t ADI8RegRead(uint32_t ui32Base, uint32_t ui32Reg)
Read the value of an 8 bit register in the ADI slave.
Definition: adi.h:470
ADI16BitsSet
__STATIC_INLINE void ADI16BitsSet(uint32_t ui32Base, uint32_t ui32Reg, uint16_t ui16Val)
Set specific bits in 2 x 8 bit ADI slave registers.
Definition: adi.h:660
ADI4SetValBit
__STATIC_INLINE void ADI4SetValBit(uint32_t ui32Base, uint32_t ui32Reg, bool bWriteHigh, uint8_t ui8Mask, uint8_t ui8Val)
Set a value on any 4 bits inside an 8 bit register in the ADI slave.
Definition: adi.h:948
ADI16SetValBit
__STATIC_INLINE void ADI16SetValBit(uint32_t ui32Base, uint32_t ui32Reg, uint32_t ui32Mask, uint32_t ui32Val)
Set a value on any bits inside an 2 x 8 bit register aligned on a half-word (byte) boundary in the AD...
Definition: adi.h:1065
ADI8BitsSet
__STATIC_INLINE void ADI8BitsSet(uint32_t ui32Base, uint32_t ui32Reg, uint8_t ui8Val)
Set specific bits in a single 8 bit ADI register.
Definition: adi.h:603
ADI_SPEED_16
#define ADI_SPEED_16
Definition: adi.h:87
ADI32BitsSet
__STATIC_INLINE void ADI32BitsSet(uint32_t ui32Base, uint32_t ui32Reg, uint32_t ui32Val)
Set specific bits in 4 x 8 bit ADI slave registers.
Definition: adi.h:717
ADI8RegWrite
__STATIC_INLINE void ADI8RegWrite(uint32_t ui32Base, uint32_t ui32Reg, uint8_t ui8Val)
Write an 8 bit value to a register in an ADI slave.
Definition: adi.h:331
ADI_NO_WAIT
#define ADI_NO_WAIT
Definition: adi.h:82
ADIConfigSet
__STATIC_INLINE void ADIConfigSet(uint32_t ui32Base, uint32_t ui32Config, bool bProtect)
Configure the ADI Slave.
Definition: adi.h:187
ADI32RegRead
__STATIC_INLINE uint32_t ADI32RegRead(uint32_t ui32Base, uint32_t ui32Reg)
Read the value in a 32 bit register.
Definition: adi.h:554
ADI_PROTECT
#define ADI_PROTECT
Definition: adi.h:95
ADI16BitsClear
__STATIC_INLINE void ADI16BitsClear(uint32_t ui32Base, uint32_t ui32Reg, uint16_t ui16Val)
Clear specific bits in two 8 bit ADI register.
Definition: adi.h:831
ADI_WAIT_FOR_ACK
#define ADI_WAIT_FOR_ACK
Definition: adi.h:83
ADI_SLAVE_REGS
#define ADI_SLAVE_REGS
Definition: adi.h:75
AuxAdiDdiSafeWrite
__STATIC_INLINE void AuxAdiDdiSafeWrite(uint32_t nAddr, uint32_t nData, uint32_t nSize)
Definition: ddi.h:152