NanoPayload

Annotated include/nanonote.h

229:6cf4059ed447
2017-07-09 Paul Boddie Continued the parameterisation of the LCD configuration activity.
paul@0 1
/*
paul@63 2
 * Ben NanoNote configuration parameters.
paul@41 3
 *
paul@27 4
 * Copyright (C) 2009 Qi Hardware Inc.
paul@27 5
 * Authors: Xiangfu Liu <xiangfu@openmobilefree.net>
paul@219 6
 * Copyright (C) 2015, 2016, 2017 Paul Boddie <paul@boddie.org.uk>
paul@0 7
 *
paul@63 8
 * This program is free software: you can redistribute it and/or modify
paul@63 9
 * it under the terms of the GNU General Public License as published by
paul@63 10
 * the Free Software Foundation, either version 3 of the License, or
paul@63 11
 * (at your option) any later version.
paul@27 12
 *
paul@27 13
 * This program is distributed in the hope that it will be useful,
paul@27 14
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
paul@27 15
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
paul@27 16
 * GNU General Public License for more details.
paul@27 17
 *
paul@27 18
 * You should have received a copy of the GNU General Public License
paul@63 19
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
paul@0 20
 */
paul@0 21
paul@27 22
#ifndef __NANONOTE_H__
paul@27 23
#define __NANONOTE_H__
paul@27 24
paul@0 25
/*
paul@0 26
 * GPIO definition
paul@5 27
 * See: http://en.qi-hardware.com/wiki/Hardware_basics
paul@0 28
 */
paul@9 29
#define GPIO_LCD_CS			(2 * 32 + 21)
paul@9 30
#define GPIO_AMP_EN			(3 * 32 + 4)
paul@0 31
paul@9 32
#define GPIO_SDPW_EN			(3 * 32 + 2)
paul@9 33
#define	GPIO_SD_DETECT			(3 * 32 + 0)
paul@0 34
paul@9 35
#define	GPIO_BUZZ_PWM			(3 * 32 + 27)
paul@9 36
#define	GPIO_USB_DETECT			(3 * 32 + 28)
paul@0 37
paul@9 38
#define	GPIO_AUDIO_POP			(1 * 32 + 29)
paul@9 39
#define GPIO_COB_TEST			(1 * 32 + 30)
paul@0 40
paul@219 41
#define GPIO_KEYIN_COUNT		8
paul@204 42
#define GPIO_KEYOUT_COUNT		8
paul@204 43
paul@108 44
#define GPIO_POWER			(3 * 32 + 29)
paul@108 45
paul@9 46
#define GPIO_SD_CD_N			GPIO_SD_DETECT	/* SD Card insert detect */
paul@9 47
#define GPIO_SD_VCC_EN_N		GPIO_SDPW_EN	/* SD Card Power Enable */
paul@0 48
paul@9 49
#define GPIO_SD_CMD			(3 * 32 + 8)
paul@6 50
paul@9 51
#define SPEN				GPIO_LCD_CS	/* LCDCS :Serial command enable      */
paul@9 52
#define SPDA				(2 * 32 + 22)	/* LCDSCL:Serial command clock input */
paul@9 53
#define SPCK				(2 * 32 + 23)	/* LCDSDA:Serial command data input  */
paul@9 54
paul@196 55
#define GPIO_IRQ			IRQ_GPIO3
paul@196 56
paul@204 57
#define GPIO_REGION_SIZE		0x10000
paul@204 58
paul@27 59
#endif /* __NANONOTE_H__ */