Projekte
BirgerT
nibo2_Birger_01
nibo2_sensors.c
Projekte
Forum
Doku
Öffentliche Projekte
Startseite
Beispielprogramme
Projekte von anderen
Welcome
Username
Passwort
Eingeloggt bleiben
Zugangsdaten vergessen?
Registrieren
Projektverwaltung
⇨ Please choose! ⇦
——————————————————
✎ Create new project...
★ Browse existing projects...
——————————————————
⚬ MotorTest#1
⚬ C Tutorial 8#1
⚬ NIBO2 C Project#1
⚙ C Tutorial 15#1
⚬ 2010_11_18_el_test001#1
nibo2_Birger_01
blib_utils.c
blib_utils.h
BSD_license.h
nibo2_global.h
nibo2_main.c
nibo2_main_01.h
nibo2_pwm_leds.c
nibo2_pwm_leds.h
nibo2_sensors.c
nibo2_sensors.h
Project details
Compiler settings
Nachrichten
Sie sind nicht eingeloggt.
Neuigkeiten
★
NiboRoboLib 3.6
2017-01-17: Neue Version 3.6
★
NiboRoboLib 3.4.1
2016-04-16: Neue Version 3.4.1
★
Coding Tutorial
2015-11-22: Jetzt auch für den NIBO burger!
Site-Statistic
7427 private projects
385 public projects
16181052 lines compiled
58220 builds
NIBO
@
nibo2_birger_1/nibo2_sensors.c [read only]
////////////////////////////////////////////////////////////////////////// // // NIBO2 SENSORS // // ////////////////////////////////////////////////////////////////////////// // BSD License see "license.h" #include "BSD_license.h" #include "nibo2_sensors.h" #ifdef __cplusplus extern "C" { #endif static uint8_t sensors_task; static uint8_t sensors_sw3state; // #define SW3_DOWN ((sensors_sw3() & 0x03) == 0x03) // #define SW3_STOP ((sensors_sw3() & 0x03) == 0x02) // #define SW3_PLAY ((sensors_sw3() & 0x03) == 0x01) // // alte Definition "SW3_DOWN" // #define SW3_DOWN (!(TSTBIT(PIND,PIND4))) // (!(PIND & (1<<SW3))) uint8_t sensors_sw3(void){ sensors_sw3state <<= 1; // sensors_sw3state &= (uint8_t)~1; // if (!(TSTBIT(PIND,PIND4))) { if (!(PIND & (1<<PIND4))) { sensors_sw3state |= 0x01; } return sensors_sw3state; } void sensors_ISR_T1(void){ } void sensors_init(){ // sensors_task = pwm_add_fn(&sensors_ISR_T1); } #ifdef __cplusplus } // extern "C" #endif //EOF
Compiler results:
Werbung
Online
adellreinoso82318550
Bogdanasf
josch
paulinegonsalves19
randalspann5740
wadehirsch7523292