summaryrefslogtreecommitdiff
path: root/src/bwbootloader/avrconfig.h
diff options
context:
space:
mode:
authorNicolas Schodet2010-06-14 00:20:08 +0200
committerNicolas Schodet2010-06-14 00:27:43 +0200
commit410eaf6017cd7c6abba3d751eb55f3ad4ffafec6 (patch)
tree5e829d342f56f222af99859d487686f8a8364e9a /src/bwbootloader/avrconfig.h
parent3166dc06c80945e4458d91fb1cf3c88d583e238d (diff)
add bootloader
Diffstat (limited to 'src/bwbootloader/avrconfig.h')
-rw-r--r--src/bwbootloader/avrconfig.h59
1 files changed, 59 insertions, 0 deletions
diff --git a/src/bwbootloader/avrconfig.h b/src/bwbootloader/avrconfig.h
new file mode 100644
index 0000000..9c378b9
--- /dev/null
+++ b/src/bwbootloader/avrconfig.h
@@ -0,0 +1,59 @@
+#ifndef avrconfig_h
+#define avrconfig_h
+/* avrconfig.h */
+/* binwatch - Tiny binary wristwatch. {{{
+ *
+ * Copyright (C) 2010 Nicolas Schodet
+ *
+ * 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.
+ *
+ * Contact :
+ * Web: http://ni.fr.eu.org/
+ * Email: <nico at ni.fr.eu.org>
+ * }}} */
+
+/* utils */
+/** AVR Frequency : 1000000, 1843200, 2000000, 3686400, 4000000, 7372800,
+ * 8000000, 11059200, 14745600, 16000000, 18432000, 20000000. */
+#define AC_FREQ 1000000
+
+/* twi - TWI module. */
+/** Driver to implement TWI: HARD, SOFT, or USI. */
+#define AC_TWI_DRIVER USI
+/** Do not use interrupts. */
+#define AC_TWI_NO_INTERRUPT 1
+/** TWI frequency, should really be 100 kHz. */
+#define AC_TWI_FREQ 100000
+/** Enable slave part. */
+#define AC_TWI_SLAVE_ENABLE 1
+/** Enable master part. */
+#define AC_TWI_MASTER_ENABLE 0
+/** Use polled slave mode: received data is stored in a buffer which can be
+ * polled using twi_slave_poll. */
+#define AC_TWI_SLAVE_POLLED 0
+/** Slave reception callback to be defined by the user when not in polled
+ * mode. */
+#define AC_TWI_SLAVE_RECV bwbootloader_recv
+/** Master transfer completion callback, optionally defined by the user, called
+ * at end of master transfer. */
+#undef AC_TWI_MASTER_DONE
+/** Use internal pull up. */
+#define AC_TWI_PULL_UP 0
+/** Slave reception buffer size. */
+#define AC_TWI_SLAVE_RECV_BUFFER_SIZE (64 + 4)
+/** Slave transmission buffer size. */
+#define AC_TWI_SLAVE_SEND_BUFFER_SIZE (64 + 4)
+
+#endif /* avrconfig_h */