瀏覽代碼

fantastic60: Implement exclusive TP mode and BL mode

fantastic60
Kai Ryu 8 年之前
父節點
當前提交
4b55e0fc9f
共有 2 個檔案被更改,包括 7 行新增1 行删除
  1. 0
    1
      keyboard/fantastic60/backlight.c
  2. 7
    0
      keyboard/fantastic60/matrix.c

+ 0
- 1
keyboard/fantastic60/backlight.c 查看文件



void backlight_set(uint8_t level) void backlight_set(uint8_t level)
{ {
softpwm_led_enable();
#ifdef BREATHING_LED_ENABLE #ifdef BREATHING_LED_ENABLE
switch (level) { switch (level) {
case 1: case 1:

+ 7
- 0
keyboard/fantastic60/matrix.c 查看文件

#endif #endif
#include "matrix.h" #include "matrix.h"
#include "rgb.h" #include "rgb.h"
#include "softpwm_led.h"


#ifndef DEBOUNCE #ifndef DEBOUNCE
# define DEBOUNCE 5 # define DEBOUNCE 5
_delay_us(30); // without this wait read unstable value. _delay_us(30); // without this wait read unstable value.
if ((PINC & (1<<PC7)) == 0) { if ((PINC & (1<<PC7)) == 0) {
ps2_mouse_enabled = 1; ps2_mouse_enabled = 1;
#ifdef SOFTPWM_LED_ENABLE
softpwm_led_disable();
#endif
} }
else { else {
ps2_mouse_enabled = 0; ps2_mouse_enabled = 0;
#ifdef SOFTPWM_LED_ENABLE
softpwm_led_enable();
#endif
} }
PORTC &= ~(1<<PC7); PORTC &= ~(1<<PC7);
#endif #endif