mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-12-08 12:45:26 -05:00
... and the entire dir is renamed too
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19063 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
55634f7410
commit
b52a3da2b5
6 changed files with 0 additions and 0 deletions
24
firmware/target/arm/as3525/sansa-m200v4/adc-target.h
Normal file
24
firmware/target/arm/as3525/sansa-m200v4/adc-target.h
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
/***************************************************************************
|
||||
* __________ __ ___.
|
||||
* Open \______ \ ____ ____ | | _\_ |__ _______ ___
|
||||
* Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
|
||||
* Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
|
||||
* Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
|
||||
* \/ \/ \/ \/ \/
|
||||
* $Id$
|
||||
*
|
||||
* Copyright (C) 2008 ??
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
* as published by the Free Software Foundation; either version 2
|
||||
* of the License, or (at your option) any later version.
|
||||
*
|
||||
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
|
||||
* KIND, either express or implied.
|
||||
*
|
||||
****************************************************************************/
|
||||
#ifndef _ADC_TARGET_H_
|
||||
#define _ADC_TARGET_H_
|
||||
|
||||
#endif /* _ADC_TARGET_H_ */
|
||||
40
firmware/target/arm/as3525/sansa-m200v4/backlight-target.h
Normal file
40
firmware/target/arm/as3525/sansa-m200v4/backlight-target.h
Normal file
|
|
@ -0,0 +1,40 @@
|
|||
/***************************************************************************
|
||||
* __________ __ ___.
|
||||
* Open \______ \ ____ ____ | | _\_ |__ _______ ___
|
||||
* Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
|
||||
* Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
|
||||
* Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
|
||||
* \/ \/ \/ \/ \/
|
||||
* $Id$
|
||||
*
|
||||
* Copyright (C) 2008 ??
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
* as published by the Free Software Foundation; either version 2
|
||||
* of the License, or (at your option) any later version.
|
||||
*
|
||||
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
|
||||
* KIND, either express or implied.
|
||||
*
|
||||
****************************************************************************/
|
||||
#ifndef BACKLIGHT_TARGET_H
|
||||
#define BACKLIGHT_TARGET_H
|
||||
|
||||
static inline bool _backlight_init(void)
|
||||
{
|
||||
GPIOD_DIR |= (1<<1);
|
||||
return true;
|
||||
}
|
||||
|
||||
static inline void _backlight_on(void)
|
||||
{
|
||||
GPIOD_PIN(1) = (1<<1);
|
||||
}
|
||||
|
||||
static inline void _backlight_off(void)
|
||||
{
|
||||
GPIOD_PIN(1) = 0x00;
|
||||
}
|
||||
|
||||
#endif
|
||||
93
firmware/target/arm/as3525/sansa-m200v4/button-m200v4.c
Normal file
93
firmware/target/arm/as3525/sansa-m200v4/button-m200v4.c
Normal file
|
|
@ -0,0 +1,93 @@
|
|||
/***************************************************************************
|
||||
* __________ __ ___.
|
||||
* Open \______ \ ____ ____ | | _\_ |__ _______ ___
|
||||
* Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
|
||||
* Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
|
||||
* Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
|
||||
* \/ \/ \/ \/ \/
|
||||
* $Id$
|
||||
*
|
||||
* Copyright (C) 2008 by ??
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
* as published by the Free Software Foundation; either version 2
|
||||
* of the License, or (at your option) any later version.
|
||||
*
|
||||
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
|
||||
* KIND, either express or implied.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
#include "config.h"
|
||||
#include "cpu.h"
|
||||
#include "button.h"
|
||||
#include "adc.h"
|
||||
|
||||
void button_init_device(void)
|
||||
{
|
||||
GPIOA_DIR &= ~((1<<3) | (1<<2) | (1<<1) | (1<<0)); /* A3-A0 is input */
|
||||
GPIOA_DIR |= ((1<<6) | (1<<5) | (1<<4)); /* A4-A6 row outputs */
|
||||
}
|
||||
|
||||
int button_read_device(void)
|
||||
{
|
||||
int result = BUTTON_NONE;
|
||||
|
||||
/* direct GPIO connections */
|
||||
if (GPIOA_PIN(3))
|
||||
result |= BUTTON_MENU;
|
||||
|
||||
/* This is a keypad using A4-A6 as columns and A0-A2 as rows */
|
||||
GPIOA_PIN(4) = (1<<4);
|
||||
|
||||
/* A4A0 is unused */
|
||||
|
||||
if (GPIOA_PIN(1))
|
||||
result |= BUTTON_VOLDOWN;
|
||||
|
||||
if (GPIOA_PIN(2))
|
||||
result |= BUTTON_PLAYPAUSE;
|
||||
|
||||
GPIOA_PIN(4) = 0x00;
|
||||
|
||||
GPIOA_PIN(5) = (1<<5);
|
||||
|
||||
if (GPIOA_PIN(0))
|
||||
result |= BUTTON_LEFT;
|
||||
|
||||
if (GPIOA_PIN(1))
|
||||
result |= BUTTON_SELECT;
|
||||
|
||||
if (GPIOA_PIN(2))
|
||||
result |= BUTTON_RIGHT;
|
||||
|
||||
GPIOA_PIN(5) = 0x00;
|
||||
|
||||
|
||||
GPIOA_PIN(6) = (1<<6);
|
||||
|
||||
if (GPIOA_PIN(0))
|
||||
result |= BUTTON_REPEATAB;
|
||||
|
||||
if (GPIOA_PIN(1))
|
||||
result |= BUTTON_VOLUP;
|
||||
|
||||
if (GPIOA_PIN(2))
|
||||
result |= BUTTON_HOLD;
|
||||
GPIOA_PIN(6) = 0x00;
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
bool button_hold(void)
|
||||
{
|
||||
bool ret = false;
|
||||
|
||||
GPIOA_PIN(6) = (1<<6);
|
||||
if (GPIOA_PIN(2))
|
||||
ret = true;
|
||||
GPIOA_PIN(6) = 0x00;
|
||||
|
||||
return ret;
|
||||
}
|
||||
55
firmware/target/arm/as3525/sansa-m200v4/button-target.h
Normal file
55
firmware/target/arm/as3525/sansa-m200v4/button-target.h
Normal file
|
|
@ -0,0 +1,55 @@
|
|||
/***************************************************************************
|
||||
* __________ __ ___.
|
||||
* Open \______ \ ____ ____ | | _\_ |__ _______ ___
|
||||
* Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
|
||||
* Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
|
||||
* Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
|
||||
* \/ \/ \/ \/ \/
|
||||
* $Id$
|
||||
*
|
||||
* Copyright (C) 2007 by Dave Chapman
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
* as published by the Free Software Foundation; either version 2
|
||||
* of the License, or (at your option) any later version.
|
||||
*
|
||||
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
|
||||
* KIND, either express or implied.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef _BUTTON_TARGET_H_
|
||||
#define _BUTTON_TARGET_H_
|
||||
|
||||
#include <stdbool.h>
|
||||
#include "config.h"
|
||||
|
||||
#define HAS_BUTTON_HOLD
|
||||
|
||||
void button_init_device(void);
|
||||
int button_read_device(void);
|
||||
bool button_hold(void);
|
||||
|
||||
/* Main unit's buttons */
|
||||
#define BUTTON_MENU 0x00000001
|
||||
#define BUTTON_VOLUP 0x00000002
|
||||
#define BUTTON_VOLDOWN 0x00000004
|
||||
#define BUTTON_PLAYPAUSE 0x00000008
|
||||
#define BUTTON_REPEATAB 0x00000010
|
||||
#define BUTTON_LEFT 0x00000020
|
||||
#define BUTTON_RIGHT 0x00000040
|
||||
#define BUTTON_SELECT 0x00000080
|
||||
#define BUTTON_HOLD 0x00000100
|
||||
|
||||
#define BUTTON_MAIN (BUTTON_MENU|BUTTON_VOLUP|BUTTON_VOLDOWN\
|
||||
|BUTTON_PLAYPAUSE|BUTTON_REPEATAB|BUTTON_LEFT\
|
||||
|BUTTON_RIGHT|BUTTON_SELECT|BUTTON_HOLD)
|
||||
|
||||
#define BUTTON_REMOTE 0
|
||||
|
||||
/* Software power-off */
|
||||
#define POWEROFF_BUTTON BUTTON_MENU
|
||||
#define POWEROFF_COUNT 40
|
||||
|
||||
#endif /* _BUTTON_TARGET_H_ */
|
||||
28
firmware/target/arm/as3525/sansa-m200v4/system-target.h
Normal file
28
firmware/target/arm/as3525/sansa-m200v4/system-target.h
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
/***************************************************************************
|
||||
* __________ __ ___.
|
||||
* Open \______ \ ____ ____ | | _\_ |__ _______ ___
|
||||
* Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
|
||||
* Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
|
||||
* Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
|
||||
* \/ \/ \/ \/ \/
|
||||
* $Id$
|
||||
*
|
||||
* Copyright (C) 2008 ??
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
* as published by the Free Software Foundation; either version 2
|
||||
* of the License, or (at your option) any later version.
|
||||
*
|
||||
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
|
||||
* KIND, either express or implied.
|
||||
*
|
||||
****************************************************************************/
|
||||
#ifndef SYSTEM_TARGET_H
|
||||
#define SYSTEM_TARGET_H
|
||||
|
||||
#include "system-arm.h"
|
||||
|
||||
#define CPUFREQ_MAX 250000000
|
||||
|
||||
#endif /* SYSTEM_TARGET_H */
|
||||
38
firmware/target/arm/as3525/sansa-m200v4/timer-target.h
Normal file
38
firmware/target/arm/as3525/sansa-m200v4/timer-target.h
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
/***************************************************************************
|
||||
* __________ __ ___.
|
||||
* Open \______ \ ____ ____ | | _\_ |__ _______ ___
|
||||
* Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
|
||||
* Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
|
||||
* Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
|
||||
* \/ \/ \/ \/ \/
|
||||
* $Id$
|
||||
*
|
||||
* Copyright (C) 2008 ??
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
* as published by the Free Software Foundation; either version 2
|
||||
* of the License, or (at your option) any later version.
|
||||
*
|
||||
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
|
||||
* KIND, either express or implied.
|
||||
*
|
||||
****************************************************************************/
|
||||
#ifndef TIMER_TARGET_H
|
||||
#define TIMER_TARGET_H
|
||||
|
||||
bool __timer_set(long cycles, bool set);
|
||||
bool __timer_register(void);
|
||||
void __timer_unregister(void);
|
||||
|
||||
#define __TIMER_SET(cycles, set) \
|
||||
__timer_set(cycles, set)
|
||||
|
||||
#define __TIMER_REGISTER(reg_prio, unregister_callback, cycles, \
|
||||
int_prio, timer_callback) \
|
||||
__timer_register()
|
||||
|
||||
#define __TIMER_UNREGISTER(...) \
|
||||
__timer_unregister()
|
||||
|
||||
#endif /* TIMER_TARGET_H */
|
||||
Loading…
Add table
Add a link
Reference in a new issue