forked from len0rd/rockbox
Killed a dozen global variables
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@3015 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
34fa62b300
commit
c3fd67c6c9
9 changed files with 27 additions and 22 deletions
|
@ -49,9 +49,9 @@ static long peak_meter_clip_timeout_r;
|
||||||
static int peak_meter_clip_hold;
|
static int peak_meter_clip_hold;
|
||||||
|
|
||||||
/* specifies the value range in peak volume values */
|
/* specifies the value range in peak volume values */
|
||||||
unsigned short peak_meter_range_min;
|
static unsigned short peak_meter_range_min;
|
||||||
unsigned short peak_meter_range_max;
|
static unsigned short peak_meter_range_max;
|
||||||
unsigned short peak_meter_range;
|
static unsigned short peak_meter_range;
|
||||||
|
|
||||||
/* if set to true clip timeout is disabled */
|
/* if set to true clip timeout is disabled */
|
||||||
static bool peak_meter_clip_eternal = false;
|
static bool peak_meter_clip_eternal = false;
|
||||||
|
|
|
@ -104,7 +104,7 @@ char *fmt_gain(int snd, int val, char *str, int len)
|
||||||
return str;
|
return str;
|
||||||
}
|
}
|
||||||
|
|
||||||
int cursor;
|
static int cursor;
|
||||||
|
|
||||||
void adjust_cursor(void)
|
void adjust_cursor(void)
|
||||||
{
|
{
|
||||||
|
|
|
@ -64,7 +64,7 @@
|
||||||
/**
|
/**
|
||||||
* All the properties that a worm has.
|
* All the properties that a worm has.
|
||||||
*/
|
*/
|
||||||
struct worm {
|
static struct worm {
|
||||||
/* The worm is stored in a ring of xy coordinates */
|
/* The worm is stored in a ring of xy coordinates */
|
||||||
char x[MAX_WORM_SEGMENTS];
|
char x[MAX_WORM_SEGMENTS];
|
||||||
char y[MAX_WORM_SEGMENTS];
|
char y[MAX_WORM_SEGMENTS];
|
||||||
|
|
|
@ -35,11 +35,13 @@
|
||||||
|
|
||||||
static enum playmode current_mode = STATUS_STOP;
|
static enum playmode current_mode = STATUS_STOP;
|
||||||
|
|
||||||
long switch_tick;
|
#if defined(HAVE_LCD_CHARCELLS) || defined(HAVE_CHARGE_CTRL)
|
||||||
int battery_charge_step = 0;
|
static long switch_tick;
|
||||||
#ifdef HAVE_LCD_BITMAP
|
static int battery_charge_step = 0;
|
||||||
bool plug_state;
|
#ifdef HAVE_CHARGE_CTRL
|
||||||
bool battery_state;
|
static bool plug_state;
|
||||||
|
static bool battery_state;
|
||||||
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
void status_init(void)
|
void status_init(void)
|
||||||
|
|
|
@ -33,7 +33,6 @@ enum playmode
|
||||||
void status_init(void);
|
void status_init(void);
|
||||||
void status_set_playmode(enum playmode mode);
|
void status_set_playmode(enum playmode mode);
|
||||||
#ifdef HAVE_LCD_BITMAP
|
#ifdef HAVE_LCD_BITMAP
|
||||||
extern bool statusbar_enabled;
|
|
||||||
bool statusbar(bool state);
|
bool statusbar(bool state);
|
||||||
#endif
|
#endif
|
||||||
void status_draw(void);
|
void status_draw(void);
|
||||||
|
|
|
@ -56,8 +56,8 @@
|
||||||
|
|
||||||
#define NAME_BUFFER_SIZE (AVERAGE_FILENAME_LENGTH * MAX_FILES_IN_DIR)
|
#define NAME_BUFFER_SIZE (AVERAGE_FILENAME_LENGTH * MAX_FILES_IN_DIR)
|
||||||
|
|
||||||
char name_buffer[NAME_BUFFER_SIZE];
|
static char name_buffer[NAME_BUFFER_SIZE];
|
||||||
int name_buffer_length;
|
static int name_buffer_length;
|
||||||
struct entry {
|
struct entry {
|
||||||
short attr; /* FAT attributes + file type flags */
|
short attr; /* FAT attributes + file type flags */
|
||||||
char *name;
|
char *name;
|
||||||
|
|
|
@ -26,7 +26,7 @@
|
||||||
|
|
||||||
long current_tick = 0;
|
long current_tick = 0;
|
||||||
|
|
||||||
void (*tick_funcs[MAX_NUM_TICK_TASKS])(void);
|
static void (*tick_funcs[MAX_NUM_TICK_TASKS])(void);
|
||||||
|
|
||||||
static void tick_start(unsigned int interval_in_ms);
|
static void tick_start(unsigned int interval_in_ms);
|
||||||
|
|
||||||
|
|
|
@ -67,11 +67,13 @@ static int get_unswapped_space(void);
|
||||||
#define MPEG_SAVE_DATA 102
|
#define MPEG_SAVE_DATA 102
|
||||||
#define MPEG_STOP_DONE 103
|
#define MPEG_STOP_DONE 103
|
||||||
|
|
||||||
enum
|
#ifdef HAVE_MAS3587F
|
||||||
|
static enum
|
||||||
{
|
{
|
||||||
MPEG_DECODER,
|
MPEG_DECODER,
|
||||||
MPEG_ENCODER
|
MPEG_ENCODER
|
||||||
} mpeg_mode;
|
} mpeg_mode;
|
||||||
|
#endif
|
||||||
|
|
||||||
extern char* playlist_peek(int steps);
|
extern char* playlist_peek(int steps);
|
||||||
extern int playlist_next(int steps);
|
extern int playlist_next(int steps);
|
||||||
|
@ -457,9 +459,9 @@ extern unsigned char mp3buf[];
|
||||||
extern unsigned char mp3end[];
|
extern unsigned char mp3end[];
|
||||||
|
|
||||||
static int mp3buflen;
|
static int mp3buflen;
|
||||||
int mp3buf_write;
|
static int mp3buf_write;
|
||||||
static int mp3buf_swapwrite;
|
static int mp3buf_swapwrite;
|
||||||
int mp3buf_read;
|
static int mp3buf_read;
|
||||||
|
|
||||||
static int last_dma_chunk_size;
|
static int last_dma_chunk_size;
|
||||||
|
|
||||||
|
@ -691,10 +693,12 @@ static void stop_dma(void)
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef HAVE_MAS3587F
|
#ifdef HAVE_MAS3587F
|
||||||
long timing_info_index = 0;
|
#ifdef DEBUG
|
||||||
long timing_info[1024];
|
static long timing_info_index = 0;
|
||||||
bool inverted_pr;
|
static long timing_info[1024];
|
||||||
unsigned long num_rec_bytes;
|
#endif
|
||||||
|
static bool inverted_pr;
|
||||||
|
static unsigned long num_rec_bytes;
|
||||||
|
|
||||||
void drain_dma_buffer(void)
|
void drain_dma_buffer(void)
|
||||||
{
|
{
|
||||||
|
|
|
@ -70,7 +70,6 @@ extern int charge_state; /* tells what the charger is doing (for info di
|
||||||
#define CURRENT_CHARGING 300 /* charging current */
|
#define CURRENT_CHARGING 300 /* charging current */
|
||||||
|
|
||||||
extern unsigned short power_history[POWER_HISTORY_LEN];
|
extern unsigned short power_history[POWER_HISTORY_LEN];
|
||||||
void set_battery_capacity(int capacity); /* set local battery capacity value */
|
|
||||||
|
|
||||||
/* Start up power management thread */
|
/* Start up power management thread */
|
||||||
void power_init(void);
|
void power_init(void);
|
||||||
|
@ -85,6 +84,7 @@ int battery_time(void); /* minutes */
|
||||||
bool battery_level_safe(void);
|
bool battery_level_safe(void);
|
||||||
|
|
||||||
void set_poweroff_timeout(int timeout);
|
void set_poweroff_timeout(int timeout);
|
||||||
|
void set_battery_capacity(int capacity); /* set local battery capacity value */
|
||||||
|
|
||||||
void set_sleep_timer(int seconds);
|
void set_sleep_timer(int seconds);
|
||||||
int get_sleep_timer(void);
|
int get_sleep_timer(void);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue