forked from len0rd/rockbox
New port: AIGO EROS Q / EROS K
The Q and K have a slightly different case, but the hardware under the shell is completely identical. These models are rebadged versions: * Hifiwalker H2 (== Q) * AGPTek H3 (== K) * Surfans F20 (== K) Other notes: * Significant improvements in the shared Hiby-platform launcher/loader * SD card can theoretically be hot-swapped now * Support external USB mass storage! * Some consolidation of Hiby-platform targets * Some consolidation of plugin keymaps Todo/known issues: * Keymaps need to be gone over properly * Convert to HAVE_SCROLLWHEEL? Change-Id: I5a8a4f22c38a5b69392ca7c0a8ad8c4e07d9523c
This commit is contained in:
parent
5efaa9ef80
commit
2a471e288c
86 changed files with 2097 additions and 1398 deletions
|
@ -334,16 +334,7 @@ GREY_INFO_STRUCT
|
|||
# define FFT_AMP_SCALE BUTTON_PLAY
|
||||
# define FFT_QUIT BUTTON_POWER
|
||||
|
||||
#elif (CONFIG_KEYPAD == XDUOO_X3II_PAD)
|
||||
# define FFT_PREV_GRAPH BUTTON_PREV
|
||||
# define FFT_NEXT_GRAPH BUTTON_NEXT
|
||||
# define FFT_ORIENTATION BUTTON_HOME
|
||||
# define FFT_FREQ_SCALE BUTTON_OPTION
|
||||
# define FFT_WINDOW (BUTTON_HOME|BUTTON_POWER)
|
||||
# define FFT_AMP_SCALE BUTTON_PLAY
|
||||
# define FFT_QUIT BUTTON_POWER
|
||||
|
||||
#elif (CONFIG_KEYPAD == XDUOO_X20_PAD)
|
||||
#elif (CONFIG_KEYPAD == XDUOO_X3II_PAD) || (CONFIG_KEYPAD == XDUOO_X20_PAD)
|
||||
# define FFT_PREV_GRAPH BUTTON_PREV
|
||||
# define FFT_NEXT_GRAPH BUTTON_NEXT
|
||||
# define FFT_ORIENTATION BUTTON_HOME
|
||||
|
@ -361,7 +352,7 @@ GREY_INFO_STRUCT
|
|||
# define FFT_AMP_SCALE BUTTON_PLAY
|
||||
# define FFT_QUIT BUTTON_POWER
|
||||
|
||||
#elif (CONFIG_KEYPAD == IHIFI_770_PAD)
|
||||
#elif (CONFIG_KEYPAD == IHIFI_770_PAD) || (CONFIG_KEYPAD == IHIFI_800_PAD)
|
||||
# define FFT_PREV_GRAPH BUTTON_PREV
|
||||
# define FFT_NEXT_GRAPH BUTTON_NEXT
|
||||
# define FFT_ORIENTATION BUTTON_HOME
|
||||
|
@ -370,13 +361,13 @@ GREY_INFO_STRUCT
|
|||
# define FFT_AMP_SCALE BUTTON_PLAY
|
||||
# define FFT_QUIT BUTTON_POWER
|
||||
|
||||
#elif (CONFIG_KEYPAD == IHIFI_800_PAD)
|
||||
# define FFT_PREV_GRAPH BUTTON_PREV
|
||||
# define FFT_NEXT_GRAPH BUTTON_NEXT
|
||||
# define FFT_ORIENTATION BUTTON_HOME
|
||||
# define FFT_FREQ_SCALE BUTTON_VOL_UP
|
||||
# define FFT_WINDOW BUTTON_VOL_DOWN
|
||||
# define FFT_AMP_SCALE BUTTON_PLAY
|
||||
#elif (CONFIG_KEYPAD == EROSQ_PAD)
|
||||
# define FFT_PREV_GRAPH BUTTON_SCROLL_BACK
|
||||
# define FFT_NEXT_GRAPH BUTTON_SCROLL_FWD
|
||||
# define FFT_ORIENTATION BUTTON_VOL_UP
|
||||
# define FFT_FREQ_SCALE BUTTON_VOL_DOWN
|
||||
# define FFT_WINDOW BUTTON_BACK
|
||||
# define FFT_AMP_SCALE BUTTON_MENU
|
||||
# define FFT_QUIT BUTTON_POWER
|
||||
|
||||
#elif !defined(HAVE_TOUCHSCREEN)
|
||||
|
@ -530,7 +521,7 @@ static struct fft_config
|
|||
int amp_scale;
|
||||
int freq_scale;
|
||||
int window_func;
|
||||
} fft_disk =
|
||||
} fft_disk =
|
||||
{
|
||||
/* Defaults */
|
||||
.orientation = FFT_OR_VERT,
|
||||
|
@ -647,7 +638,7 @@ static void apply_window_func(enum fft_window_func mode)
|
|||
/* Calculates the magnitudes from complex numbers and returns the maximum */
|
||||
static unsigned calc_magnitudes(enum fft_amp_scale scale)
|
||||
{
|
||||
/* A major assumption made when calculating the Q*MAX constants
|
||||
/* A major assumption made when calculating the Q*MAX constants
|
||||
* is that the maximum magnitude is 29 bits long. */
|
||||
unsigned this_max = 0;
|
||||
kiss_fft_cpx *this_output = output[output_head] + 1; /* skip DC */
|
||||
|
@ -806,7 +797,7 @@ static void draw_lines_vertical(unsigned this_max, unsigned graph_max)
|
|||
{
|
||||
int bins_acc = LCD_WIDTH / 2;
|
||||
unsigned bins_max = 0;
|
||||
|
||||
|
||||
for(int i = 0, x = 0; i < ARRAYLEN_PLOT; ++i)
|
||||
{
|
||||
unsigned bin = plot[i];
|
||||
|
@ -1107,7 +1098,7 @@ static inline bool fft_get_fft(void)
|
|||
/* This block can introduce discontinuities in our data. Meaning, the
|
||||
* FFT will not be done a continuous segment of the signal. Which can
|
||||
* be bad. Or not.
|
||||
*
|
||||
*
|
||||
* Anyway, this is a demo, not a scientific tool. If you want accuracy,
|
||||
* do a proper spectrum analysis.*/
|
||||
|
||||
|
@ -1409,7 +1400,7 @@ static void fft_setting_update(unsigned which)
|
|||
[FFT_OR_HORZ] = draw_bars_horizontal,
|
||||
[FFT_OR_VERT] = draw_bars_vertical,
|
||||
},
|
||||
[FFT_DM_SPECTROGRAM] =
|
||||
[FFT_DM_SPECTROGRAM] =
|
||||
{
|
||||
[FFT_OR_HORZ] = draw_spectrogram_horizontal,
|
||||
[FFT_OR_VERT] = draw_spectrogram_vertical,
|
||||
|
@ -1533,7 +1524,7 @@ static void fft_cleanup(void)
|
|||
{
|
||||
myosd_destroy();
|
||||
|
||||
fft_close_fft();
|
||||
fft_close_fft();
|
||||
|
||||
#ifdef HAVE_ADJUSTABLE_CPU_FREQ
|
||||
rb->cancel_cpu_boost();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue