mark some functions as init functions (discarded after init() has run)
tick_start, fmradio_i2c_init, pcm_init, pcm_postinit, pcm_play_dma_init Also add some as3525 target specific functions Make as3525v2 use this attribute git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26328 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
b36e721aa6
commit
435e08eae1
6 changed files with 10 additions and 8 deletions
|
@ -753,7 +753,7 @@ Lyre prototype 1 */
|
|||
#define IBSS_ATTR
|
||||
#define STATICIRAM static
|
||||
#endif
|
||||
#if (defined(CPU_PP) || (CONFIG_CPU == AS3525)) \
|
||||
#if (defined(CPU_PP) || (CONFIG_CPU == AS3525) || (CONFIG_CPU == AS3525v2)) \
|
||||
&& !defined(SIMULATOR) && !defined(BOOTLOADER)
|
||||
/* Functions that have INIT_ATTR attached are NOT guaranteed to survive after
|
||||
* root_menu() has been called. Their code may be overwritten by other data or
|
||||
|
|
|
@ -22,9 +22,10 @@
|
|||
#ifndef FMRADIO_I2C_H
|
||||
#define FMRADIO_I2C_H
|
||||
|
||||
#include "config.h" /* for INIT_ATTR */
|
||||
#include <stdbool.h>
|
||||
|
||||
void fmradio_i2c_init(void);
|
||||
void fmradio_i2c_init(void) INIT_ATTR;
|
||||
void fmradio_i2c_enable(bool enable);
|
||||
int fmradio_i2c_write(unsigned char address, const unsigned char* buf, int count);
|
||||
int fmradio_i2c_read(unsigned char address, unsigned char* buf, int count);
|
||||
|
|
|
@ -211,7 +211,7 @@ extern void yield(void);
|
|||
extern void sleep(int ticks);
|
||||
int tick_add_task(void (*f)(void));
|
||||
int tick_remove_task(void (*f)(void));
|
||||
extern void tick_start(unsigned int interval_in_ms);
|
||||
extern void tick_start(unsigned int interval_in_ms) INIT_ATTR;
|
||||
|
||||
#ifdef INCLUDE_TIMEOUT_API
|
||||
struct timeout;
|
||||
|
|
|
@ -67,8 +67,8 @@ void pcm_apply_settings(void);
|
|||
void pcm_play_lock(void);
|
||||
void pcm_play_unlock(void);
|
||||
|
||||
void pcm_init(void);
|
||||
void pcm_postinit(void);
|
||||
void pcm_init(void) INIT_ATTR;
|
||||
void pcm_postinit(void) INIT_ATTR;
|
||||
|
||||
/* This is for playing "raw" PCM data */
|
||||
void pcm_play_data(pcm_play_callback_type get_more,
|
||||
|
@ -104,7 +104,7 @@ extern volatile bool pcm_paused;
|
|||
|
||||
void pcm_play_dma_lock(void);
|
||||
void pcm_play_dma_unlock(void);
|
||||
void pcm_play_dma_init(void);
|
||||
void pcm_play_dma_init(void) INIT_ATTR;
|
||||
void pcm_play_dma_start(const void *addr, size_t size);
|
||||
void pcm_play_dma_stop(void);
|
||||
void pcm_play_dma_pause(bool pause);
|
||||
|
|
|
@ -70,7 +70,7 @@ struct ascodec_request {
|
|||
struct ascodec_request *next;
|
||||
};
|
||||
|
||||
void ascodec_init(void);
|
||||
void ascodec_init(void) INIT_ATTR;
|
||||
|
||||
int ascodec_write(unsigned int index, unsigned int value);
|
||||
|
||||
|
|
|
@ -19,6 +19,7 @@
|
|||
*
|
||||
****************************************************************************/
|
||||
|
||||
#include "config.h" /* for INIT_ATTR */
|
||||
#include <stdbool.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
|
@ -32,7 +33,7 @@
|
|||
#define DMA_PERI_SD 5 /* embedded storage */
|
||||
#define DMA_PERI_DBOP 8
|
||||
|
||||
void dma_init(void);
|
||||
void dma_init(void) INIT_ATTR;
|
||||
void dma_enable_channel(int channel, void *src, void *dst, int peri,
|
||||
int flow_controller, bool src_inc, bool dst_inc,
|
||||
size_t size, int nwords, void (*callback)(void));
|
||||
|
|
Loading…
Reference in a new issue