lotus: Add ifdef for pico variant
Pico doesn't expose all the pins so it'll be a bit different. Just for prototyping. Signed-off-by: Daniel Schaefer <git@danielschaefer.me>
This commit is contained in:
@@ -5,6 +5,10 @@
|
|||||||
|
|
||||||
#include <config_common.h>
|
#include <config_common.h>
|
||||||
|
|
||||||
|
// Prototype for Lotus with Raspberry Pi Pico
|
||||||
|
// SDB is mapped to GP22
|
||||||
|
#define PICO_LOTUS
|
||||||
|
|
||||||
// 18-digit serial number. Must be programmed at factory
|
// 18-digit serial number. Must be programmed at factory
|
||||||
// TODO: Figure out how to do that. Probably a script to compile qmk
|
// TODO: Figure out how to do that. Probably a script to compile qmk
|
||||||
#define SERIAL_NUMBER "FRALDLvvccxxxxxxxx"
|
#define SERIAL_NUMBER "FRALDLvvccxxxxxxxx"
|
||||||
|
|||||||
@@ -6,13 +6,17 @@
|
|||||||
|
|
||||||
#define MUX_ENABLE_GPIO GP4
|
#define MUX_ENABLE_GPIO GP4
|
||||||
#define BOOT_DONE_GPIO GP5
|
#define BOOT_DONE_GPIO GP5
|
||||||
// SDB
|
// Pin SDB to enable the RGB controller
|
||||||
|
#ifdef PICO_LOTUS
|
||||||
// 22 only on RPi Pico because it doesn't have GP29
|
// 22 only on RPi Pico because it doesn't have GP29
|
||||||
#define IS31FL3743A_ENABLE_GPIO GP22
|
#define IS31FL3743A_ENABLE_GPIO GP22
|
||||||
//#define IS31FL3743A_ENABLE_GPIO GP29
|
#else
|
||||||
|
#define IS31FL3743A_ENABLE_GPIO GP29
|
||||||
|
#endif
|
||||||
|
|
||||||
|
void keyboard_post_init_kb(void) {
|
||||||
|
keyboard_post_init_user();
|
||||||
|
|
||||||
void keyboard_post_init_user(void) {
|
|
||||||
// Enable debug output
|
// Enable debug output
|
||||||
debug_enable = true;
|
debug_enable = true;
|
||||||
debug_matrix = true;
|
debug_matrix = true;
|
||||||
@@ -22,14 +26,21 @@ void keyboard_post_init_user(void) {
|
|||||||
/**
|
/**
|
||||||
* Hook into early keyboard initialization
|
* Hook into early keyboard initialization
|
||||||
*/
|
*/
|
||||||
void keyboard_pre_init_user(void) {
|
void keyboard_pre_init_kb(void) {
|
||||||
|
keyboard_pre_init_user();
|
||||||
|
|
||||||
// Mark boot as done.
|
// Mark boot as done.
|
||||||
// Before this, when holding down both alt keys QSPI_SS is pulled low to put
|
// Before this, when holding down both alt keys QSPI_SS is pulled low to put
|
||||||
// the RP2040 in bootloader mode during reset.
|
// the RP2040 in bootloader mode during reset.
|
||||||
setPinOutput(BOOT_DONE_GPIO);
|
setPinOutput(BOOT_DONE_GPIO);
|
||||||
writePinHigh(BOOT_DONE_GPIO);
|
writePinHigh(BOOT_DONE_GPIO);
|
||||||
|
|
||||||
// TODO: Do we ever need to disable it to save power?
|
//// TODO: Do we ever need to disable it to save power?
|
||||||
|
#ifndef PICO_LOTUS
|
||||||
|
setPinOutput(MUX_ENABLE_GPIO);
|
||||||
|
writePinHigh(MUX_ENABLE_GPIO);
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef RGB_MATRIX_ENABLE
|
#ifdef RGB_MATRIX_ENABLE
|
||||||
//// TODO: Do we ever need to disable it to save power?
|
//// TODO: Do we ever need to disable it to save power?
|
||||||
setPinOutput(IS31FL3743A_ENABLE_GPIO);
|
setPinOutput(IS31FL3743A_ENABLE_GPIO);
|
||||||
|
|||||||
Reference in New Issue
Block a user