A modern Music Player Daemon based on Rockbox open source high quality audio player
libadwaita audio rust zig deno mpris rockbox mpd
at master 56 lines 2.0 kB view raw
1/*************************************************************************** 2 * __________ __ ___. 3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___ 4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / 5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < 6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ 7 * \/ \/ \/ \/ \/ 8 * $Id$ 9 * 10 * Copyright (C) 2002 by Ulf Ralberg 11 * 12 * This program is free software; you can redistribute it and/or 13 * modify it under the terms of the GNU General Public License 14 * as published by the Free Software Foundation; either version 2 15 * of the License, or (at your option) any later version. 16 * 17 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY 18 * KIND, either express or implied. 19 * 20 ****************************************************************************/ 21 22#include "config.h" 23 24#if defined(CPU_ARM_MICRO) && ARCH_VERSION >= 7 25/* 26 * Cortex-M cannot load/store SP with ldm/stm so we need to store it 27 * separately. This makes it slightly more efficient to store SP last 28 * so as not to split the register list. 29 */ 30struct regs 31{ 32 uint32_t r[8]; /* 0-28 - Registers r4-r11 */ 33 uint32_t lr; /* 32 - r14 (lr) */ 34 uint32_t sp; /* 36 - Stack pointer (r13) */ 35 uint32_t start; /* 40 - Thread start address, or NULL when started */ 36}; 37#else 38struct regs 39{ 40 uint32_t r[8]; /* 0-28 - Registers r4-r11 */ 41 uint32_t sp; /* 32 - Stack pointer (r13) */ 42 uint32_t lr; /* 36 - r14 (lr) */ 43 uint32_t start; /* 40 - Thread start address, or NULL when started */ 44}; 45#endif 46 47#if (CONFIG_PLATFORM & PLATFORM_HOSTED) 48 #include <errno.h> 49#if defined(DX50) || defined (DX90) 50 #define DEFAULT_STACK_SIZE 0x2000 /* Bytes */ 51#else 52 #define DEFAULT_STACK_SIZE 0x1000 /* Bytes */ 53#endif 54#else 55 #define DEFAULT_STACK_SIZE 0x400 /* Bytes */ 56#endif