Generalized-Core-Counter 3.20
Particle-based generalized core counter firmware
Loading...
Searching...
No Matches
device_pinout.h
Go to the documentation of this file.
1
44
45// ******************* Not a Singleton - Just a header file for pin definitions **********************
46
47#ifndef DEVICE_PINOUT_H
48#define DEVICE_PINOUT_H
49
50#include "Particle.h"
51// Logical pin names used throughout the application.
52//
53// The intent is to keep all *device-specific* pin numbers (D12 vs MOSI vs S1,
54// etc.) inside device_pinout.cpp. The rest of the firmware should only use
55// these logical names so that swapping between Boron, P2, or future
56// devices only requires changes in one place.
57
58// ---------------------------------------------------------------------------
59// Carrier-board common pins (independent of specific sensor)
60// ---------------------------------------------------------------------------
61extern const pin_t BUTTON_PIN; // User switch on carrier (front-panel)
62extern const pin_t TMP36_SENSE_PIN; // Carrier board temperature sensor (A4)
63extern const pin_t BLUE_LED; // On-module blue status LED (D7)
64extern const pin_t WAKEUP_PIN; // AB1805 FOUT/nIRQ wake pin (WKP = D10 on Photon2, was D8 on Argon/Boron)
65
66// ---------------------------------------------------------------------------
67// Optional build-time hardware flags
68// ---------------------------------------------------------------------------
69// Some platforms (notably Photon 2 / P2 dev boards) may not have an analog
70// temperature sensor wired. In that case, SensorManager uses a stub value.
71//
72// If you are building for a carrier that *does* provide a TMP36 (for example,
73// a Muon carrier), define MUON_HAS_TMP36 (typically in your top-level .cpp or
74// in the Particle Workbench build defines) to force the TMP36 sampling path.
75//
76// You can also override which pin the carrier uses by defining
77// MUON_TMP36_SENSE_PIN to a valid pin name (for example: A4, A0, S4).
78//
79// Muon boards also include an onboard TMP112A I2C temperature sensor.
80// By default, the firmware will probe for it at runtime and prefer it when
81// present (Muon will "just work").
82//
83// Optional overrides:
84// - MUON_HAS_TMP112: force-enable TMP112A path (skip probe)
85// - DISABLE_TMP112_AUTODETECT: skip probing for TMP112A
86// - MUON_TMP112_I2C_ADDR: 7-bit address (default 0x48)
87
88// ---------------------------------------------------------------------------
89// Sensor-specific logical pins (PIR-on-carrier configuration)
90// ---------------------------------------------------------------------------
91// NOTE: The actual hardware mapping (D13 vs S2 vs SCK, etc.) is handled in
92// device_pinout.cpp using PLATFORM_ID (Boron vs P2, etc.). Application code
93// should always use these names, never raw Dxx/Sx/MISO/MOSI identifiers.
94extern const pin_t intPin; // PIR interrupt pin (SPI clock line)
95extern const pin_t disableModule; // Sensor enable line
96extern const pin_t ledPower; // Sensor LED power
97
100
101#endif
const pin_t BLUE_LED
const pin_t TMP36_SENSE_PIN
const pin_t ledPower
const pin_t disableModule
const pin_t WAKEUP_PIN
const pin_t BUTTON_PIN
const pin_t intPin
bool initializePinModes()
bool initializePowerCfg()