]> git.friedersdorff.com Git - max/tmk_keyboard.git/commitdiff
Mkdir rn42
authortmk <nobody@nowhere>
Fri, 18 Jul 2014 17:33:23 +0000 (02:33 +0900)
committertmk <nobody@nowhere>
Wed, 30 Jul 2014 05:38:26 +0000 (14:38 +0900)
keyboard/hhkb_rn42/MEMO.txt
keyboard/hhkb_rn42/Makefile
keyboard/hhkb_rn42/rn42.mk [new file with mode: 0644]
keyboard/hhkb_rn42/rn42/main.c [moved from keyboard/hhkb_rn42/main.c with 99% similarity]
keyboard/hhkb_rn42/rn42/rn42.c [moved from keyboard/hhkb_rn42/rn42.c with 100% similarity]
keyboard/hhkb_rn42/rn42/rn42.h [moved from keyboard/hhkb_rn42/rn42.h with 100% similarity]
keyboard/hhkb_rn42/rn42/rn42_task.c [moved from keyboard/hhkb_rn42/rn42_task.c with 100% similarity]
keyboard/hhkb_rn42/rn42/rn42_task.h [moved from keyboard/hhkb_rn42/rn42_task.h with 80% similarity]
keyboard/hhkb_rn42/rn42/suart.S [moved from keyboard/hhkb_rn42/suart.S with 100% similarity]
keyboard/hhkb_rn42/rn42/suart.h [moved from keyboard/hhkb_rn42/suart.h with 100% similarity]
rules.mk

index 36d4afb98a96a7e4c5f70f1c4fd5010101b94fe1..100b4442d66fccd222bd27b52207b4795ab003a8 100644 (file)
@@ -2,6 +2,7 @@ Roving RN-42
 ============
 07/16   After fix of voltage dividor on GPIO6, had a trouble that it could not send a char to BT module, though could receive.
         Found R8 had wrong 1K resistor and changed to 10K, after that it can send to the module again. Not sure how it had sent with the wrong 1K before.
+07/18   On Linux, had an USB related trouble; keyobard or console didn't work for some reason. Changing PID cured this problem. Very annoying, took very long time before resolved it.
 
 
 
@@ -28,6 +29,28 @@ DONE:
 - Power selector doesn't work; Q4 MOSFET leaks from Lipo to USB power line. -- use Schottky instead 07/04
 
 
+Lipo
+----
+Sparkfun Polymer Lithium Ion Battery 850mAh:
+https://www.sparkfun.com/products/341
+Lipo Cell spec:
+https://www.sparkfun.com/datasheets/Batteries/063048%20Li-polymer.pdf
+Protection spec:
+http://dlnmh9ip6v2uc.cloudfront.net/datasheets/Prototyping/BatteryProtection.pdf
+                            min     typical max
+over-charge                 4.255   4.280   4.305
+over-charge discover?       4.030   4.080   4.130        
+over-discharge              2.827   2.900   2.973
+over-discharge discover     3.022   3.100   3.178
+
+ADC voltage monitor:    voltage divider 10K+10K(0.5)
+    ADC=V*0.5/2.56*1024
+    V       ADC
+    ------------------
+    4.20    0x347(839)
+    3.10    0x26b(619)
+    
+
 
 
 Configuration
index 7a27a43c0468f8593cf0bdac6b19e7b6129d6eeb..b46b777898d1ea0a8955b4382fe3b7e59d7ebfa1 100644 (file)
@@ -51,12 +51,7 @@ TARGET_DIR = .
 # List C source files here. (C dependencies are automatically generated.)
 SRC += keymap_common.c \
        matrix.c \
-       led.c \
-       serial_uart.c \
-       suart.S \
-       rn42.c \
-       rn42_task.c \
-       main.c
+       led.c
 
 ifdef KEYMAP
     SRC := keymap_$(KEYMAP).c $(SRC)
@@ -135,6 +130,7 @@ COMMAND_ENABLE = yes        # Commands for debug and configuration
 VPATH += $(TARGET_DIR)
 VPATH += $(TOP_DIR)
 
+include rn42.mk
 include $(TOP_DIR)/protocol.mk
 include $(TOP_DIR)/protocol/lufa.mk
 include $(TOP_DIR)/common.mk
diff --git a/keyboard/hhkb_rn42/rn42.mk b/keyboard/hhkb_rn42/rn42.mk
new file mode 100644 (file)
index 0000000..653a809
--- /dev/null
@@ -0,0 +1,11 @@
+RN42_DIR = rn42
+
+SRC +=  serial_uart.c \
+       rn42/suart.S \
+       rn42/rn42.c \
+       rn42/rn42_task.c \
+       rn42/main.c
+
+OPT_DEFS += -DPROTOCOL_RN42
+
+VPATH += $(RN42_DIR)
similarity index 99%
rename from keyboard/hhkb_rn42/main.c
rename to keyboard/hhkb_rn42/rn42/main.c
index c84f6b0a6a26b8fc4ece600f4c4db99f0014a7f8..a3a37c0747dbba9815c4de949b903dd2f715cf3b 100644 (file)
@@ -13,6 +13,7 @@
 #include "action_util.h"
 #include "wait.h"
 #include "suart.h"
+#include "suspend.h"
 
 static int8_t sendchar_func(uint8_t c)
 {
similarity index 80%
rename from keyboard/hhkb_rn42/rn42_task.h
rename to keyboard/hhkb_rn42/rn42/rn42_task.h
index d75b03017a74e217e2d162cdbe414c6c124ca065..8f6c3ab64d6256c9dacad3b1f96c61074cfe2393 100644 (file)
@@ -4,6 +4,7 @@
 #include <stdbool.h>
 #include "rn42.h"
 
+void rn42_task_init(void);
 void rn42_task(void);
 
 #endif
index 7a40d1de9f4ae5a05015a9896b1dec0cb434a3c3..83c9da5f84cd4917ff8d5908a1d3598e7b7e3893 100644 (file)
--- a/rules.mk
+++ b/rules.mk
@@ -565,6 +565,7 @@ $(OBJDIR)/%.o : %.cpp
 # Assemble: create object files from assembler source files.
 $(OBJDIR)/%.o : %.S
        @echo
+       mkdir -p $(@D)
        @echo $(MSG_ASSEMBLING) $<
        $(CC) -c $(ALL_ASFLAGS) $< -o $@