diff options
Diffstat (limited to 'firmware/export/mc13783.h')
-rw-r--r-- | firmware/export/mc13783.h | 99 |
1 files changed, 99 insertions, 0 deletions
diff --git a/firmware/export/mc13783.h b/firmware/export/mc13783.h new file mode 100644 index 0000000000..fe9ff74e33 --- /dev/null +++ b/firmware/export/mc13783.h | |||
@@ -0,0 +1,99 @@ | |||
1 | /*************************************************************************** | ||
2 | * __________ __ ___. | ||
3 | * Open \______ \ ____ ____ | | _\_ |__ _______ ___ | ||
4 | * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / | ||
5 | * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < | ||
6 | * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ | ||
7 | * \/ \/ \/ \/ \/ | ||
8 | * $Id$ | ||
9 | * | ||
10 | * Copyright (c) 2008 by Michael Sevakis | ||
11 | * | ||
12 | * All files in this archive are subject to the GNU General Public License. | ||
13 | * See the file COPYING in the source tree root for full license agreement. | ||
14 | * | ||
15 | * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY | ||
16 | * KIND, either express or implied. | ||
17 | * | ||
18 | ****************************************************************************/ | ||
19 | #ifndef _MC13783_H_ | ||
20 | #define _MC13783_H_ | ||
21 | |||
22 | enum mc13783_regs_enum | ||
23 | { | ||
24 | MC13783_INTERRUPT_STATUS0 = 0x00, | ||
25 | MC13783_INTERRUPT_MASK0, | ||
26 | MC13783_INTERRUPT_SENSE0, | ||
27 | MC13783_INTERRUPT_STATUS1, | ||
28 | MC13783_INTERRUPT_MASK1, | ||
29 | MC13783_INTERRUPT_SENSE1, | ||
30 | MC13783_POWER_UP_MODE_SENSE, | ||
31 | MC13783_IDENTIFICATION, | ||
32 | MC13783_SEMAPHORE, | ||
33 | MC13783_ARBITRATION_PERIPHERAL_AUDIO, | ||
34 | MC13783_ARBITRATION_SWITCHERS, | ||
35 | MC13783_ARBITRATION_REGULATORS0, | ||
36 | MC13783_ARBITRATION_REGULATORS1, | ||
37 | MC13783_POWER_CONTROL0, | ||
38 | MC13783_POWER_CONTROL1, | ||
39 | MC13783_POWER_CONTROL2, | ||
40 | MC13783_REGEN_ASSIGNMENT, | ||
41 | MC13783_CONTROL_SPARE, | ||
42 | MC13783_MEMORYA, | ||
43 | MC13783_MEMORYB, | ||
44 | MC13783_RTC_TIME, | ||
45 | MC13783_RTC_ALARM, | ||
46 | MC13783_RTC_DAY, | ||
47 | MC13783_RTC_DAY_ALARM, | ||
48 | MC13783_SWITCHERS0, | ||
49 | MC13783_SWITCHERS1, | ||
50 | MC13783_SWITCHERS2, | ||
51 | MC13783_SWITCHERS3, | ||
52 | MC13783_SWITCHERS4, | ||
53 | MC13783_SWITCHERS5, | ||
54 | MC13783_REGULATOR_SETTING0, | ||
55 | MC13783_REGULATOR_SETTING1, | ||
56 | MC13783_REGULATOR_MODE0, | ||
57 | MC13783_REGULATOR_MODE1, | ||
58 | MC13783_POWER_MISCELLANEOUS, | ||
59 | MC13783_POWER_SPARE, | ||
60 | MC13783_AUDIO_RX0, | ||
61 | MC13783_AUDIO_RX1, | ||
62 | MC13783_AUDIO_TX, | ||
63 | MC13783_SSI_NETWORK, | ||
64 | MC13783_AUDIO_CODEC, | ||
65 | MC13783_AUDIO_STEREO_CODEC, | ||
66 | MC13783_AUDIO_SPARE, | ||
67 | MC13783_ADC0, | ||
68 | MC13783_ADC1, | ||
69 | MC13783_ADC2, | ||
70 | MC13783_ADC3, | ||
71 | MC13783_ADC4, | ||
72 | MC13783_CHARGER, | ||
73 | MC13783_USB0, | ||
74 | MC13783_CHARGER_USB1, | ||
75 | MC13783_LED_CONTROL0, | ||
76 | MC13783_LED_CONTROL1, | ||
77 | MC13783_LED_CONTROL2, | ||
78 | MC13783_LED_CONTROL3, | ||
79 | MC13783_LED_CONTROL4, | ||
80 | MC13783_LED_CONTROL5, | ||
81 | MC13783_SPARE, | ||
82 | MC13783_TRIM0, | ||
83 | MC13783_TRIM1, | ||
84 | MC13783_TEST0, | ||
85 | MC13783_TEST1, | ||
86 | MC13783_TEST2, | ||
87 | MC13783_TEST3, | ||
88 | MC13783_NUM_REGS, | ||
89 | }; | ||
90 | |||
91 | void mc13783_init(void); | ||
92 | void mc13783_set(unsigned address, uint32_t bits); | ||
93 | void mc13783_clear(unsigned address, uint32_t bits); | ||
94 | int mc13783_write(unsigned address, uint32_t data); | ||
95 | int mc13783_write_multiple(unsigned start, const uint32_t *buffer, int count); | ||
96 | uint32_t mc13783_read(unsigned address); | ||
97 | int mc13783_read_multiple(unsigned start, uint32_t *buffer, int count); | ||
98 | |||
99 | #endif /* _MC13783_H_ */ | ||