summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortmk <nobody@nowhere>2014-07-19 02:33:23 +0900
committertmk <nobody@nowhere>2014-07-30 14:38:26 +0900
commit59ea5e02f76a37e5021c5f9d02af149e48e7c07c (patch)
tree816e1555f73552df3f59a3d08f654c1e23f532fd
parentb4e4f599dfe1b3ecff69ab248866e7b801c35f1e (diff)
downloadqmk_firmware-59ea5e02f76a37e5021c5f9d02af149e48e7c07c.tar.gz
qmk_firmware-59ea5e02f76a37e5021c5f9d02af149e48e7c07c.zip
Mkdir rn42
-rw-r--r--keyboard/hhkb_rn42/MEMO.txt23
-rw-r--r--keyboard/hhkb_rn42/Makefile8
-rw-r--r--keyboard/hhkb_rn42/rn42.mk11
-rw-r--r--keyboard/hhkb_rn42/rn42/main.c (renamed from keyboard/hhkb_rn42/main.c)1
-rw-r--r--keyboard/hhkb_rn42/rn42/rn42.c (renamed from keyboard/hhkb_rn42/rn42.c)0
-rw-r--r--keyboard/hhkb_rn42/rn42/rn42.h (renamed from keyboard/hhkb_rn42/rn42.h)0
-rw-r--r--keyboard/hhkb_rn42/rn42/rn42_task.c (renamed from keyboard/hhkb_rn42/rn42_task.c)0
-rw-r--r--keyboard/hhkb_rn42/rn42/rn42_task.h (renamed from keyboard/hhkb_rn42/rn42_task.h)1
-rw-r--r--keyboard/hhkb_rn42/rn42/suart.S (renamed from keyboard/hhkb_rn42/suart.S)0
-rw-r--r--keyboard/hhkb_rn42/rn42/suart.h (renamed from keyboard/hhkb_rn42/suart.h)0
-rw-r--r--rules.mk1
11 files changed, 39 insertions, 6 deletions
diff --git a/keyboard/hhkb_rn42/MEMO.txt b/keyboard/hhkb_rn42/MEMO.txt
index 36d4afb98a..100b4442d6 100644
--- a/keyboard/hhkb_rn42/MEMO.txt
+++ b/keyboard/hhkb_rn42/MEMO.txt
@@ -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
diff --git a/keyboard/hhkb_rn42/Makefile b/keyboard/hhkb_rn42/Makefile
index 7a27a43c04..b46b777898 100644
--- a/keyboard/hhkb_rn42/Makefile
+++ b/keyboard/hhkb_rn42/Makefile
@@ -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
index 0000000000..653a809242
--- /dev/null
+++ b/keyboard/hhkb_rn42/rn42.mk
@@ -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)
diff --git a/keyboard/hhkb_rn42/main.c b/keyboard/hhkb_rn42/rn42/main.c
index c84f6b0a6a..a3a37c0747 100644
--- a/keyboard/hhkb_rn42/main.c
+++ b/keyboard/hhkb_rn42/rn42/main.c
@@ -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)
{
diff --git a/keyboard/hhkb_rn42/rn42.c b/keyboard/hhkb_rn42/rn42/rn42.c
index 3fcd64ad6a..3fcd64ad6a 100644
--- a/keyboard/hhkb_rn42/rn42.c
+++ b/keyboard/hhkb_rn42/rn42/rn42.c
diff --git a/keyboard/hhkb_rn42/rn42.h b/keyboard/hhkb_rn42/rn42/rn42.h
index 4189733b49..4189733b49 100644
--- a/keyboard/hhkb_rn42/rn42.h
+++ b/keyboard/hhkb_rn42/rn42/rn42.h
diff --git a/keyboard/hhkb_rn42/rn42_task.c b/keyboard/hhkb_rn42/rn42/rn42_task.c
index 7ec4c1b540..7ec4c1b540 100644
--- a/keyboard/hhkb_rn42/rn42_task.c
+++ b/keyboard/hhkb_rn42/rn42/rn42_task.c
diff --git a/keyboard/hhkb_rn42/rn42_task.h b/keyboard/hhkb_rn42/rn42/rn42_task.h
index d75b03017a..8f6c3ab64d 100644
--- a/keyboard/hhkb_rn42/rn42_task.h
+++ b/keyboard/hhkb_rn42/rn42/rn42_task.h
@@ -4,6 +4,7 @@
#include <stdbool.h>
#include "rn42.h"
+void rn42_task_init(void);
void rn42_task(void);
#endif
diff --git a/keyboard/hhkb_rn42/suart.S b/keyboard/hhkb_rn42/rn42/suart.S
index 9fa5452928..9fa5452928 100644
--- a/keyboard/hhkb_rn42/suart.S
+++ b/keyboard/hhkb_rn42/rn42/suart.S
diff --git a/keyboard/hhkb_rn42/suart.h b/keyboard/hhkb_rn42/rn42/suart.h
index 72725b998f..72725b998f 100644
--- a/keyboard/hhkb_rn42/suart.h
+++ b/keyboard/hhkb_rn42/rn42/suart.h
diff --git a/rules.mk b/rules.mk
index 7a40d1de9f..83c9da5f84 100644
--- 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 $@