From 5fb869cf604d11896e6b1c3917eb7a60ffb6ba04 Mon Sep 17 00:00:00 2001 From: Ben Blazak Date: Thu, 22 Aug 2013 21:49:07 -0700 Subject: [PATCH] working on eeprom-macro (still) --- doc/references.md | 7 ++++++- firmware/lib/layout/eeprom-macro.h | 21 +++++++++++++++------ firmware/lib/twi.h | 3 --- firmware/lib/twi/atmega32u4.c | 3 +++ firmware/main.c | 4 ++++ 5 files changed, 28 insertions(+), 10 deletions(-) diff --git a/doc/references.md b/doc/references.md index fc897ea..ea3efbc 100644 --- a/doc/references.md +++ b/doc/references.md @@ -651,7 +651,7 @@ : post by [Unix Guru] (http://geekhack.org/index.php?action=profile;u=24565) on -### Hardware Stuff (for the keyboard case) +### Hardware and DIY Stuff (for the keyboard case, and such) * [Working with Acrylic] (http://www.bcae1.com/plexi.htm) @@ -669,6 +669,11 @@ * [Kurplop's finishing of the aluminum case (from Massdrop round 1)] (http://geekhack.org/index.php?topic=22780.msg854128#msg854128) +* [Geekhack: DIY resources] + (http://geekhack.org/index.php?topic=33298.0) + A nice short list of things one might want to know for keyboard hardware + projects. + ### Some Random Stuff * [Tutorial: Metacompilers Part 1] diff --git a/firmware/lib/layout/eeprom-macro.h b/firmware/lib/layout/eeprom-macro.h index e7f5573..a9996dc 100644 --- a/firmware/lib/layout/eeprom-macro.h +++ b/firmware/lib/layout/eeprom-macro.h @@ -84,12 +84,6 @@ // ---------------------------------------------------------------------------- -/** macros/OPT__EEPROM__EEPROM_MACRO__START/description - * The first EEMEM address in the block assigned to this section of the code - */ -/** macros/OPT__EEPROM__EEPROM_MACRO__END/description - * The last EEMEM address in the block assigned to this section of the code - */ #if OPT__EEPROM__EEPROM_MACRO__START > OPT__EEPROM__EEPROM_MACRO__END #error "OPT__EEPROM__EEPROM_MACRO__START must be smaller than ...END" #endif @@ -119,6 +113,21 @@ void eeprom_macro__clear_all (void); // ============================================================================ +// ---------------------------------------------------------------------------- +// macros --------------------------------------------------------------------- +// ---------------------------------------------------------------------------- + +// === OPT__EEPROM__EEPROM_MACRO__START === +/** macros/OPT__EEPROM__EEPROM_MACRO__START/description + * The first EEMEM address in the block assigned to this section of the code + */ + +// === OPT__EEPROM__EEPROM_MACRO__END === +/** macros/OPT__EEPROM__EEPROM_MACRO__END/description + * The last EEMEM address in the block assigned to this section of the code + */ + + // ---------------------------------------------------------------------------- // functions ------------------------------------------------------------------ // ---------------------------------------------------------------------------- diff --git a/firmware/lib/twi.h b/firmware/lib/twi.h index b7c53cf..e585733 100644 --- a/firmware/lib/twi.h +++ b/firmware/lib/twi.h @@ -27,9 +27,6 @@ #ifndef OPT__TWI__FREQUENCY #error "OPT__TWI__FREQUENCY not defined" #endif -/** macros/OPT__TWI__FREQUENCY/description - * The frequency (in Hz) at which TWI will run - */ // ---------------------------------------------------------------------------- diff --git a/firmware/lib/twi/atmega32u4.c b/firmware/lib/twi/atmega32u4.c index 30028b4..10bfaa0 100644 --- a/firmware/lib/twi/atmega32u4.c +++ b/firmware/lib/twi/atmega32u4.c @@ -36,6 +36,9 @@ * - The max speed for the ATmega32U4 is 400kHz (datasheet sec. 20.1) * - The max speed for the MCP23017 is 1.7MHz (datasheet pg. 1) * - The max speed for the MCP23018 is 3.4MHz (datasheet pg. 1) + * + * TODO: do these implementation notes belong in the keyboard "options.h", + * where they're set? */ // ---------------------------------------------------------------------------- diff --git a/firmware/main.c b/firmware/main.c index 8ffd458..0c4f1dc 100644 --- a/firmware/main.c +++ b/firmware/main.c @@ -28,6 +28,10 @@ * * Notes: * - Cherry MX bounce time <= 5ms (at 16 in/sec actuation speed) (spec) + * + * TODO: does this documentation (and preprocessor check) belong in "main.h"? + * also, does the note belong in the keyboard "options.h", as an + * "implementation note"? */ #ifndef OPT__DEBOUNCE_TIME #error "OPT__DEBOUNCE_TIME not defined"