smart_alarm/spi.h
2025-09-20 18:09:58 +02:00

21 lines
531 B
C

#ifndef SMART_ALARM_SPI_H
#define SMART_ALARM_SPI_H
// SPI Defines
// We are going to use SPI 0, and allocate it to the following GPIO pins
// Pins can be changed, see the GPIO function select table in the datasheet for
// information on GPIO assignments
#define SPI_PORT spi0
#define PIN_CS 17
#define PIN_SCK 18
#define PIN_MOSI 19
#define PIN_DC 16
#define PIN_RST 20
#define SPI_CLOCK_HZ 40000000
// #define SPI_CLOCK_HZ 1000
#define MEMORY_WRITE 0x2C
#define SLEEP_ON 0x10
#define SLEEP_OFF 0x11
#endif // SMART_ALARM_SPI_H