summaryrefslogtreecommitdiff
path: root/n/es-2006/src/others.h
diff options
context:
space:
mode:
Diffstat (limited to 'n/es-2006/src/others.h')
-rw-r--r--n/es-2006/src/others.h16
1 files changed, 13 insertions, 3 deletions
diff --git a/n/es-2006/src/others.h b/n/es-2006/src/others.h
index 0e25348..9b9611f 100644
--- a/n/es-2006/src/others.h
+++ b/n/es-2006/src/others.h
@@ -25,7 +25,10 @@
//
// }}}
-#include "common/io.h"
+#include "io.h"
+#include "common.h"
+
+#include "ack.h"
/* pin responsible for the color mode */
#define JACK_PIN 0
@@ -49,13 +52,20 @@ inline uint8_t others_selectcoul (void)
/** return the value of pin jack */
inline uint8_t others_jack (void)
{
- return GET_PIN_OF_PORTA (JACK_PIN);
+ return !GET_PIN_OF_PORTA (JACK_PIN);
}
/** return the value of pin contact */
inline uint8_t others_contact (void)
{
- return GET_PIN_OF_PORTA (CONTACT_PIN);
+ return !GET_PIN_OF_PORTA (CONTACT_PIN);
+}
+
+/** Update ack if some contact happened ! */
+inline void others_contact_update (void)
+{
+ if (others_contact ())
+ ack_set (ACK_CONTACT_FRONT);
}
/** Return the jack and the select_colour at the same time */