]> git.donarmstrong.com Git - kiibohd-controller.git/commitdiff
Removing aliased_bitband.h
authorJacob Alexander <haata@kiibohd.com>
Sun, 13 Apr 2014 04:09:35 +0000 (21:09 -0700)
committerJacob Alexander <haata@kiibohd.com>
Sun, 13 Apr 2014 04:09:35 +0000 (21:09 -0700)
- It's useless :P
- Only one line of code ever used it.

Debug/led/led.c
Lib/MacroLib.h
Lib/MainLib.h
Lib/OutputLib.h
Lib/ScanLib.h
Lib/aliased_bitband.h [deleted file]
Lib/pin_map.teensy3

index 4ecff2a1647349faf03bbe6854946c0900c78463..97a97d79b4cda54d7730759b7353721f87768edc 100644 (file)
@@ -44,10 +44,11 @@ inline void init_errorLED()
 // ARM
 #elif defined(_mk20dx128_) || defined(_mk20dx256_)
 
+       // Enable pin
+       GPIOC_PDDR |= (1<<5);
+
        // Setup pin - Pin 11 -> C5 - See Lib/pin_map.teensy3 for more details on pins
        PORTC_PCR5 = PORT_PCR_SRE | PORT_PCR_DSE | PORT_PCR_MUX(1);
-       // Enable pin
-       GPIO_BITBAND_MODREG( GPIOC_PDOR, 5 ) = 1;
 
 #endif
 }
index bc433da53a31813740fbb446be1f6d6556e347bb..cce75b193300148463d11055ae2c3282b9bddd6d 100644 (file)
@@ -1,15 +1,15 @@
 /* Copyright (C) 2013-2014 by Jacob Alexander
- * 
+ *
  * Permission is hereby granted, free of charge, to any person obtaining a copy
  * of this software and associated documentation files (the "Software"), to deal
  * in the Software without restriction, including without limitation the rights
  * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
  * copies of the Software, and to permit persons to whom the Software is
  * furnished to do so, subject to the following conditions:
- * 
+ *
  * The above copyright notice and this permission notice shall be included in
  * all copies or substantial portions of the Software.
- * 
+ *
  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
@@ -37,7 +37,6 @@
 #if defined(_mk20dx128_) || defined(_mk20dx256_)
 
 #include <Lib/mk20dx.h>
-#include <Lib/aliased_bitband.h>
 #include <Lib/delay.h>
 
 #endif
index 05d39993bc3b96d5259a2caf0d191984023791f6..507b4d25153bc4a12cf42da1fa65d1effa8aa428 100644 (file)
@@ -1,15 +1,15 @@
 /* Copyright (C) 2013-2014 by Jacob Alexander
- * 
+ *
  * Permission is hereby granted, free of charge, to any person obtaining a copy
  * of this software and associated documentation files (the "Software"), to deal
  * in the Software without restriction, including without limitation the rights
  * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
  * copies of the Software, and to permit persons to whom the Software is
  * furnished to do so, subject to the following conditions:
- * 
+ *
  * The above copyright notice and this permission notice shall be included in
  * all copies or substantial portions of the Software.
- * 
+ *
  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
@@ -37,7 +37,6 @@
 #if defined(_mk20dx128_) || defined(_mk20dx256_)
 
 #include <Lib/mk20dx.h>
-#include <Lib/aliased_bitband.h>
 
 #endif
 
index 594260fd46a5cc222ce845ba8816c0d8b5ee2a3e..d495e0c2dd7b436622fc4bc34f9e59b435ed0208 100644 (file)
@@ -1,15 +1,15 @@
 /* Copyright (C) 2013-2014 by Jacob Alexander
- * 
+ *
  * Permission is hereby granted, free of charge, to any person obtaining a copy
  * of this software and associated documentation files (the "Software"), to deal
  * in the Software without restriction, including without limitation the rights
  * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
  * copies of the Software, and to permit persons to whom the Software is
  * furnished to do so, subject to the following conditions:
- * 
+ *
  * The above copyright notice and this permission notice shall be included in
  * all copies or substantial portions of the Software.
- * 
+ *
  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
index bff0ae71632685433ab984646a6ddf6deb9d55a3..f8de05447562576a6506e542f511848ee3fec5c2 100644 (file)
@@ -1,15 +1,15 @@
 /* Copyright (C) 2013-2014 by Jacob Alexander
- * 
+ *
  * Permission is hereby granted, free of charge, to any person obtaining a copy
  * of this software and associated documentation files (the "Software"), to deal
  * in the Software without restriction, including without limitation the rights
  * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
  * copies of the Software, and to permit persons to whom the Software is
  * furnished to do so, subject to the following conditions:
- * 
+ *
  * The above copyright notice and this permission notice shall be included in
  * all copies or substantial portions of the Software.
- * 
+ *
  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
@@ -37,7 +37,6 @@
 #if defined(_mk20dx128_) || defined(_mk20dx256_)
 
 #include <Lib/mk20dx.h>
-#include <Lib/aliased_bitband.h>
 #include <Lib/delay.h>
 
 #endif
diff --git a/Lib/aliased_bitband.h b/Lib/aliased_bitband.h
deleted file mode 100644 (file)
index 44e8859..0000000
+++ /dev/null
@@ -1,37 +0,0 @@
-
-#ifndef __aliased_bitband_h
-#define __aliased_bitband_h
-
-
-// Aliased Regions for single bit (0th) register access
-
-// Chapter 4: Memory Map (Table 4-1)
-
-
-
-// TODO
-// - Not all tested, and not all sections added
-
-
-
-// 0x2200 0000 - 0x23FF FFFF - Aliased to SRAM_U bitband
-// TODO
-
-
-
-// 0x4200 0000 - 0x43FF FFFF - Aliased to AIPS and GPIO bitband
-#define GPIO_BITBAND_ADDR(reg, bit) (((uint32_t)&(reg) - 0x40000000) * 32 + (bit) * 4 + 0x42000000)
-#define GPIO_BITBAND_PTR(reg, bit) ((uint32_t *)GPIO_BITBAND_ADDR((reg), (bit)))
-
-// XXX - Only MODREG is tested to work...
-#define GPIO_BITBAND_OUTREG(reg, bit) *((uint32_t *)GPIO_BITBAND_ADDR((reg), (bit)) +   0)
-#define GPIO_BITBAND_SETREG(reg, bit) *((uint32_t *)GPIO_BITBAND_ADDR((reg), (bit)) +  32)
-#define GPIO_BITBAND_CLRREG(reg, bit) *((uint32_t *)GPIO_BITBAND_ADDR((reg), (bit)) +  64)
-#define GPIO_BITBAND_TOGREG(reg, bit) *((uint32_t *)GPIO_BITBAND_ADDR((reg), (bit)) +  96)
-#define GPIO_BITBAND_INPREG(reg, bit) *((uint32_t *)GPIO_BITBAND_ADDR((reg), (bit)) + 128)
-#define GPIO_BITBAND_MODREG(reg, bit) *((uint32_t *)GPIO_BITBAND_ADDR((reg), (bit)) + 160)
-
-
-
-#endif
-
index 922eeb497521beb9424c831c29b79be933fd0b41..e440a5f62ddb3b943fdbcd2f6ef87dbc9b1c46e3 100644 (file)
@@ -1,12 +1,12 @@
 // Pin                         Arduino
 //  0  B16                     RXD
 //  1  B17                     TXD
-//  2  D0                      
+//  2  D0
 //  3  A12     FTM1_CH0        
 //  4  A13     FTM1_CH1        
 //  5  D7      FTM0_CH7        OC0B/T1
 //  6  D4      FTM0_CH4        OC0A
-//  7  D2                      
+//  7  D2
 //  8  D3                      ICP1
 //  9  C3      FTM0_CH2        OC1A
 // 10  C4      FTM0_CH3        SS/OC1B