Skip to content
Snippets Groups Projects
Commit b51e8bf7 authored by Christian Thalhammer's avatar Christian Thalhammer
Browse files

-disabled CARDDETECT if PIN is set to -1

- redo disable Beeper if PIN is set to -1
parent 3183a147
Branches
Tags
No related merge requests found
...@@ -27,7 +27,11 @@ ...@@ -27,7 +27,11 @@
#define CLICKED (buttons&EN_C) #define CLICKED (buttons&EN_C)
#define BLOCK {blocking=millis()+blocktime;} #define BLOCK {blocking=millis()+blocktime;}
#if (SDCARDDETECT > -1)
{
#define CARDINSERTED (READ(SDCARDDETECT)==0) #define CARDINSERTED (READ(SDCARDDETECT)==0)
}
#endif
#else #else
......
...@@ -130,7 +130,7 @@ void beep() ...@@ -130,7 +130,7 @@ void beep()
{ {
//return; //return;
#ifdef ULTIPANEL #ifdef ULTIPANEL
if (BEEPER > -1) #if (BEEPER > -1)
{ {
pinMode(BEEPER,OUTPUT); pinMode(BEEPER,OUTPUT);
for(int8_t i=0;i<20;i++){ for(int8_t i=0;i<20;i++){
...@@ -141,13 +141,14 @@ void beep() ...@@ -141,13 +141,14 @@ void beep()
} }
} }
#endif #endif
#endif
} }
void beepshort() void beepshort()
{ {
//return; //return;
#ifdef ULTIPANEL #ifdef ULTIPANEL
if (BEEPER > -1) #if (BEEPER > -1)
{ {
pinMode(BEEPER,OUTPUT); pinMode(BEEPER,OUTPUT);
for(int8_t i=0;i<10;i++){ for(int8_t i=0;i<10;i++){
...@@ -158,6 +159,7 @@ void beepshort() ...@@ -158,6 +159,7 @@ void beepshort()
} }
} }
#endif #endif
#endif
} }
void lcd_status() void lcd_status()
...@@ -203,7 +205,11 @@ void buttons_init() ...@@ -203,7 +205,11 @@ void buttons_init()
WRITE(BTN_EN1,HIGH); WRITE(BTN_EN1,HIGH);
WRITE(BTN_EN2,HIGH); WRITE(BTN_EN2,HIGH);
WRITE(BTN_ENC,HIGH); WRITE(BTN_ENC,HIGH);
#if (SDCARDDETECT > -1)
{
WRITE(SDCARDDETECT,HIGH); WRITE(SDCARDDETECT,HIGH);
}
#endif
#else #else
pinMode(SHIFT_CLK,OUTPUT); pinMode(SHIFT_CLK,OUTPUT);
pinMode(SHIFT_LD,OUTPUT); pinMode(SHIFT_LD,OUTPUT);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment