start to write switch.c
This commit is contained in:
15
V1/switch.c
Normal file
15
V1/switch.c
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
/*
|
||||||
|
* switch.c
|
||||||
|
* How to register an button and count this
|
||||||
|
* author: Simon Wörner, Manuel Vögele,
|
||||||
|
* Siegfried Kienzle
|
||||||
|
* 24-March-2017
|
||||||
|
*
|
||||||
|
* */
|
||||||
|
|
||||||
|
//Source: http://elinux.org/RPi_GPIO_Code_Samples:
|
||||||
|
#define BCM2837_PERIPHERIAL_BASE 0x3F000000
|
||||||
|
#define GPIO_BASE (BCM2837_PERIPHERIAL_BASE + 0x3F000000)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Reference in New Issue
Block a user