Browse Source

Mkdir rn42

tags/v1.9
tmk 9 years ago
parent
commit
59ea5e02f7

+ 23
- 0
keyboard/hhkb_rn42/MEMO.txt View File

============ ============
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. 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. 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.






- Power selector doesn't work; Q4 MOSFET leaks from Lipo to USB power line. -- use Schottky instead 07/04 - 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 Configuration

+ 2
- 6
keyboard/hhkb_rn42/Makefile View File

# List C source files here. (C dependencies are automatically generated.) # List C source files here. (C dependencies are automatically generated.)
SRC += keymap_common.c \ SRC += keymap_common.c \
matrix.c \ matrix.c \
led.c \
serial_uart.c \
suart.S \
rn42.c \
rn42_task.c \
main.c
led.c


ifdef KEYMAP ifdef KEYMAP
SRC := keymap_$(KEYMAP).c $(SRC) SRC := keymap_$(KEYMAP).c $(SRC)
VPATH += $(TARGET_DIR) VPATH += $(TARGET_DIR)
VPATH += $(TOP_DIR) VPATH += $(TOP_DIR)


include rn42.mk
include $(TOP_DIR)/protocol.mk include $(TOP_DIR)/protocol.mk
include $(TOP_DIR)/protocol/lufa.mk include $(TOP_DIR)/protocol/lufa.mk
include $(TOP_DIR)/common.mk include $(TOP_DIR)/common.mk

+ 11
- 0
keyboard/hhkb_rn42/rn42.mk View File

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)

keyboard/hhkb_rn42/main.c → keyboard/hhkb_rn42/rn42/main.c View File

#include "action_util.h" #include "action_util.h"
#include "wait.h" #include "wait.h"
#include "suart.h" #include "suart.h"
#include "suspend.h"


static int8_t sendchar_func(uint8_t c) static int8_t sendchar_func(uint8_t c)
{ {

keyboard/hhkb_rn42/rn42.c → keyboard/hhkb_rn42/rn42/rn42.c View File


keyboard/hhkb_rn42/rn42.h → keyboard/hhkb_rn42/rn42/rn42.h View File


keyboard/hhkb_rn42/rn42_task.c → keyboard/hhkb_rn42/rn42/rn42_task.c View File


keyboard/hhkb_rn42/rn42_task.h → keyboard/hhkb_rn42/rn42/rn42_task.h View File

#include <stdbool.h> #include <stdbool.h>
#include "rn42.h" #include "rn42.h"


void rn42_task_init(void);
void rn42_task(void); void rn42_task(void);


#endif #endif

keyboard/hhkb_rn42/suart.S → keyboard/hhkb_rn42/rn42/suart.S View File


keyboard/hhkb_rn42/suart.h → keyboard/hhkb_rn42/rn42/suart.h View File


+ 1
- 0
rules.mk View File

# Assemble: create object files from assembler source files. # Assemble: create object files from assembler source files.
$(OBJDIR)/%.o : %.S $(OBJDIR)/%.o : %.S
@echo @echo
mkdir -p $(@D)
@echo $(MSG_ASSEMBLING) $< @echo $(MSG_ASSEMBLING) $<
$(CC) -c $(ALL_ASFLAGS) $< -o $@ $(CC) -c $(ALL_ASFLAGS) $< -o $@



Loading…
Cancel
Save