Bluenet  5.7.0
Bluenet, firmware for nRF52 smart home devices
Loading...
Searching...
No Matches
cs_ACR01B10B.h
Go to the documentation of this file.
1/*
2 * Author: Crownstone Team
3 * Copyright: Crownstone (https://crownstone.rocks)
4 * Date: Jan 25, 2022
5 * License: LGPLv3+, Apache License 2.0, and/or MIT (triple-licensed)
6 */
7
8#pragma once
9
10#include <boards/cs_ACR01B10D.h>
11#include <cfg/cs_Boards.h>
12#include <cfg/cs_DeviceTypes.h>
14#include <stddef.h>
15
16void asACR01B10B(boards_config_t* config, const cs_uicr_data_t* uicrData) {
17 // The ACR01B10B is similar to ACR01B10D, but lacks the dimmer enable pin.
18 asACR01B10D(config);
19 config->flags.usesNfcPins = false;
20 config->pinEnableDimmer = PIN_NONE;
21 config->flags.canDimOnWarmBoot = false;
22 config->flags.dimmerOnWhenPinsFloat = true;
23
24 if (uicrData != NULL && uicrData->majorMinorPatch.fields.patch >= 2) {
25 // With patch 2:
26 config->pinEnableDimmer = 15;
27 config->flags.canDimOnWarmBoot = true;
28 config->flags.dimmerOnWhenPinsFloat = false;
29
30 config->pinGpio[3] = PIN_NONE;
31 }
32}
void asACR01B10B(boards_config_t *config, const cs_uicr_data_t *uicrData)
Definition: cs_ACR01B10B.h:16
void asACR01B10D(boards_config_t *config)
The ACR01B10D is also known as the Crownstone Built-in One.
Definition: cs_ACR01B10D.h:75
#define PIN_NONE
Definition: cs_Boards.h:94
Board configuration.
Definition: cs_Boards.h:169
struct boards_config_t::@7 flags
Flags about pin order, presence of components, etc.
uint8_t pinGpio[GPIO_INDEX_COUNT]
GPIO pins that can be used as GPIO by the user, for example microapps.
Definition: cs_Boards.h:219
bool dimmerOnWhenPinsFloat
True if the dimmer can be on when the pins are floating (during boot).
Definition: cs_Boards.h:269
bool canDimOnWarmBoot
True if the Crownstone can dim immediately after a warm boot.
Definition: cs_Boards.h:266
bool usesNfcPins
True if the NFC pins (p0.09 and p0.10) are used as GPIO.
Definition: cs_Boards.h:256
uint8_t pinEnableDimmer
GPIO pin to enable the IGBT circuit.
Definition: cs_Boards.h:177
Struct with all the Crownstone fields in UICR.
Definition: cs_UicrPacket.h:20
struct cs_uicr_data_t::@35::@38 fields
uint8_t patch
Definition: cs_UicrPacket.h:35
union cs_uicr_data_t::@36 majorMinorPatch