Update Reference.md
This commit is contained in:
parent
b7e62f86db
commit
1d7d4e3093
|
|
@ -422,6 +422,19 @@ Custom Services may contain a mix of both Custom Characteristics and standard HA
|
|||
|
||||
A fully worked example showing how to use both the ***CUSTOM_SERV()*** and ***CUSTOM_CHAR()*** macros to create a Pressure Sensor Accessory that is recognized by *Eve for HomeKit* can be found in the Arduino IDE under [*File → Examples → HomeSpan → Other Examples → CustomService*](../Other%20Examples/CustomService).
|
||||
|
||||
## Other Macros
|
||||
|
||||
### *SPAN_ACCESSORY()* and *SPAN_ACCESSORY(NAME)*
|
||||
|
||||
A "convenience" macro that implements the following very common code snippet used when creating Accessories. The last line is only included if *NAME* (a c-style string) has been included as an argument to the macro:
|
||||
|
||||
```C++
|
||||
new SpanAccessory();
|
||||
new Service::AccessoryInformation();
|
||||
new Characteristic::Identify();
|
||||
new Characteristic::Name(NAME); // included only in the second form of the macro
|
||||
```
|
||||
|
||||
## User-Definable Macros
|
||||
|
||||
### *#define REQUIRED VERSION(major,minor,patch)*
|
||||
|
|
|
|||
Loading…
Reference in New Issue