diff options
author | Rafaël Carré <rafael.carre@gmail.com> | 2010-06-01 10:16:10 +0000 |
---|---|---|
committer | Rafaël Carré <rafael.carre@gmail.com> | 2010-06-01 10:16:10 +0000 |
commit | df34a4767f9cb1478eb5e231484bba9124422c38 (patch) | |
tree | f6b8b7a2c66c63a846ee83e40187b8a8a124edd0 /firmware/target/arm/as3525/ascodec-target.h | |
parent | dc32a5b14ccad55ce1f1848a16d5605b9019ae87 (diff) | |
download | rockbox-df34a4767f9cb1478eb5e231484bba9124422c38.tar.gz rockbox-df34a4767f9cb1478eb5e231484bba9124422c38.zip |
as3525 ascodec: make internal functions statics and remove some details for ascodec-target.h header
reorder static functions to avoid the need for early prototypes
panic if the INT_AUDIO callback could not read the 3 IRQ_ENRD registers
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26445 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/target/arm/as3525/ascodec-target.h')
-rw-r--r-- | firmware/target/arm/as3525/ascodec-target.h | 48 |
1 files changed, 0 insertions, 48 deletions
diff --git a/firmware/target/arm/as3525/ascodec-target.h b/firmware/target/arm/as3525/ascodec-target.h index a92fea9f61..7c47bd7e9c 100644 --- a/firmware/target/arm/as3525/ascodec-target.h +++ b/firmware/target/arm/as3525/ascodec-target.h | |||
@@ -46,30 +46,6 @@ | |||
46 | #define CVDD_1_10 2 | 46 | #define CVDD_1_10 2 |
47 | #define CVDD_1_05 3 | 47 | #define CVDD_1_05 3 |
48 | 48 | ||
49 | #define ASCODEC_REQ_READ 0 | ||
50 | #define ASCODEC_REQ_WRITE 1 | ||
51 | |||
52 | /* | ||
53 | * How many bytes we using in struct ascodec_request for the data buffer. | ||
54 | * 4 fits the alignment best right now. | ||
55 | * We don't actually use more than 3 at the moment (when reading interrupts) | ||
56 | * Upper limit would be 255 since DACNT is 8 bits! | ||
57 | */ | ||
58 | #define ASCODEC_REQ_MAXLEN 4 | ||
59 | |||
60 | typedef void (ascodec_cb_fn)(unsigned const char *data, unsigned cnt); | ||
61 | |||
62 | struct ascodec_request { | ||
63 | unsigned char type; | ||
64 | unsigned char index; | ||
65 | unsigned char status; | ||
66 | unsigned char cnt; | ||
67 | unsigned char data[ASCODEC_REQ_MAXLEN]; | ||
68 | struct wakeup wkup; | ||
69 | ascodec_cb_fn *callback; | ||
70 | struct ascodec_request *next; | ||
71 | }; | ||
72 | |||
73 | void ascodec_init(void) INIT_ATTR; | 49 | void ascodec_init(void) INIT_ATTR; |
74 | 50 | ||
75 | int ascodec_write(unsigned int index, unsigned int value); | 51 | int ascodec_write(unsigned int index, unsigned int value); |
@@ -78,30 +54,6 @@ int ascodec_read(unsigned int index); | |||
78 | 54 | ||
79 | int ascodec_readbytes(unsigned int index, unsigned int len, unsigned char *data); | 55 | int ascodec_readbytes(unsigned int index, unsigned int len, unsigned char *data); |
80 | 56 | ||
81 | /* | ||
82 | * The request struct passed in must be allocated statically. | ||
83 | * If you call ascodec_async_write from different places, each | ||
84 | * call needs it's own request struct. | ||
85 | * This comment is duplicated in .c and .h for your convenience. | ||
86 | */ | ||
87 | void ascodec_async_write(unsigned index, unsigned int value, struct ascodec_request *req); | ||
88 | |||
89 | /* | ||
90 | * The request struct passed in must be allocated statically. | ||
91 | * If you call ascodec_async_read from different places, each | ||
92 | * call needs it's own request struct. | ||
93 | * If len is bigger than ASCODEC_REQ_MAXLEN it will be | ||
94 | * set to ASCODEC_REQ_MAXLEN. | ||
95 | * This comment is duplicated in .c and .h for your convenience. | ||
96 | */ | ||
97 | void ascodec_async_read(unsigned index, unsigned int len, | ||
98 | struct ascodec_request *req, ascodec_cb_fn *cb); | ||
99 | |||
100 | void ascodec_req_init(struct ascodec_request *req, int type, | ||
101 | unsigned int index, unsigned int cnt); | ||
102 | |||
103 | void ascodec_submit(struct ascodec_request *req); | ||
104 | |||
105 | void ascodec_lock(void); | 57 | void ascodec_lock(void); |
106 | 58 | ||
107 | void ascodec_unlock(void); | 59 | void ascodec_unlock(void); |