1 /***************************************************************************
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
10 * Copyright (c) 2008 by Michael Sevakis
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.
15 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
16 * KIND, either express or implied.
18 ****************************************************************************/
22 enum mc13783_regs_enum
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
,
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
,
47 MC13783_RTC_DAY_ALARM
,
54 MC13783_REGULATOR_SETTING0
,
55 MC13783_REGULATOR_SETTING1
,
56 MC13783_REGULATOR_MODE0
,
57 MC13783_REGULATOR_MODE1
,
58 MC13783_POWER_MISCELLANEOUS
,
65 MC13783_AUDIO_STEREO_CODEC
,
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
);
99 #endif /* _MC13783_H_ */