fantastic60: Implement exclusive TP mode and BL mode
This commit is contained in:
parent
763f524db8
commit
4b55e0fc9f
@ -35,7 +35,6 @@ static const uint8_t backlight_table[] PROGMEM = {
|
|||||||
|
|
||||||
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:
|
||||||
|
@ -30,6 +30,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
#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
|
||||||
@ -81,9 +82,15 @@ void matrix_init(void)
|
|||||||
_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
|
||||||
|
Reference in New Issue
Block a user