summaryrefslogtreecommitdiff
path: root/openpicc/config/board.h
diff options
context:
space:
mode:
authorhenryk <henryk@6dc7ffe9-61d6-0310-9af1-9938baff3ed1>2007-11-06 20:26:48 +0000
committerhenryk <henryk@6dc7ffe9-61d6-0310-9af1-9938baff3ed1>2007-11-06 20:26:48 +0000
commit633c646ab36368caf6eaeedd326d9f1835196afd (patch)
treefdd0f60747745d3e528c0f5d8f8895b26fb79633 /openpicc/config/board.h
parent3b41196cb6b64cf6ba8ba41d6995428f73d4764a (diff)
Initial import of FreeRTOS code for OpenPICC
git-svn-id: https://svn.openpcd.org:2342/trunk@311 6dc7ffe9-61d6-0310-9af1-9938baff3ed1
Diffstat (limited to 'openpicc/config/board.h')
-rw-r--r--openpicc/config/board.h78
1 files changed, 78 insertions, 0 deletions
diff --git a/openpicc/config/board.h b/openpicc/config/board.h
new file mode 100644
index 0000000..5a56155
--- /dev/null
+++ b/openpicc/config/board.h
@@ -0,0 +1,78 @@
+/***************************************************************
+ *
+ * OpenBeacon.org - board specific configuration
+ *
+ * Copyright 2007 Milosch Meriac <meriac@openbeacon.de>
+ *
+ * change this file to reflect hardware design changes
+ *
+ ***************************************************************
+
+ 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; version 2.
+
+ 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.,
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+*/
+#ifndef Board_h
+#define Board_h
+
+#include "lib_AT91SAM7.h"
+
+#define RAMFUNC __attribute__ ((long_call, section (".ramfunc")))
+#define IRQFUNC __attribute__ ((interrupt("IRQ")))
+#define FIQFUNC __attribute__ ((interrupt("FIQ")))
+
+#define true -1
+#define false 0
+
+/*-------------------------------*/
+/* SAM7Board Memories Definition */
+/*-------------------------------*/
+
+#define ENVIRONMENT_SIZE 1024
+#define FLASH_PAGE_NB AT91C_IFLASH_NB_OF_PAGES-(ENVIRONMENT_SIZE/AT91C_IFLASH_PAGE_SIZE)
+
+/*-----------------*/
+/* Master Clock */
+/*-----------------*/
+
+#define EXT_OC 18432000 // Exetrnal ocilator MAINCK
+#define MCK 47923200 // MCK (PLLRC div by 2)
+#define MCKKHz (MCK/1000) //
+
+/*-----------------*/
+/* LED declaration */
+/*-----------------*/
+
+//#define LED_GREEN (1L<<23)
+#define LED_GREEN AT91C_PIO_PA25
+//#define LED_RED (1L<<20)
+#define LED_RED AT91C_PIO_PA12
+#define LED_MASK (LED_GREEN|LED_RED)
+
+/*-----------------*/
+/* task priorities */
+/*-----------------*/
+
+#define TASK_BEACON_PRIORITY ( tskIDLE_PRIORITY )
+#define TASK_BEACON_STACK ( 512 )
+
+#define TASK_CMD_PRIORITY ( tskIDLE_PRIORITY + 1 )
+#define TASK_CMD_STACK ( 512 )
+
+#define TASK_USB_PRIORITY ( tskIDLE_PRIORITY + 2 )
+#define TASK_USB_STACK ( 512 )
+
+#define TASK_NRF_PRIORITY ( tskIDLE_PRIORITY + 3 )
+#define TASK_NRF_STACK ( 512 )
+
+#endif /* Board_h */
personal git repositories of Harald Welte. Your mileage may vary