📄 power.h
字号:
/**@file power.c @brief Butterfly MP3 Power Routines @author Nick Lott @date January 2006 Copyright (C) 2004 Nick Lott <brokentoaster@sf.net> http://butterflymp3.sf.net/ This is the power control software for the ButterflyMP3 project. This file contains all software responsible for controlling the power save modes for the mp3 player. 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 program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. Target(s)...: ATmega169 Compiler....: AVR-GCC 3.3.1; avr-libc 1.2 **/#ifndef POWER_H#define POWER_H#include "types.h"#define PWR_MAX_V 0x290 ///< 4.2V#define PWR_GOOD_V 0x268 ///< 3.85V#define PWR_AVG_V 0x240 ///< 3.6V average voltage#define PWR_MIN_V 0x1D9 ///< 3.0V#define PWR_ABS_MIN_V 0x1C0 ///< 2.8V absolute minimum allowed battery voltagevolatile uint8 gPowerSaveTimer; // used for sleep mode power downvoid Power_Init(void);void Power_idle(void);void Power_save(void);void Power_off(void);uint16 Power_check(void);#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -