~toykeeper/flashlight-firmware/fsm

« back to all changes in this revision

Viewing changes to ToyKeeper/tk.h

  • Committer: Selene ToyKeeper
  • Date: 2023-11-04 15:09:10 UTC
  • mfrom: (483.1.175 anduril2)
  • Revision ID: bzr@toykeeper.net-20231104150910-ddd3afw4nhfvof2l
merged anduril2 branch -> fsm, with *years* of changes
(this also means this code is now Anduril 2 instead of Anduril 1)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
#ifndef TK_H
2
 
#define TK_H
 
1
// tk.h : misc handy stuff
 
2
// Copyright (C) 2015-2023 Selene ToyKeeper
 
3
// SPDX-License-Identifier: GPL-3.0-or-later
 
4
#pragma once
3
5
 
4
6
/////
5
7
// tk.h
7
9
// but which don't need to be repeated in every source file
8
10
////
9
11
 
 
12
// AVR GCC has no boolean type by default
 
13
// (this isn't native bool, but it's mostly okay)
 
14
#define bool uint8_t
 
15
#define false 0
 
16
#define true 1
 
17
#define FALSE 0
 
18
#define TRUE 1
 
19
 
10
20
// create a way to include files defined at the command line,
11
21
// like with "gcc -DCONFIGFILE=foo.h"
12
22
#define incfile2(s) #s
14
24
// use it like this:
15
25
//#include incfile(CONFIGFILE)
16
26
 
17
 
#endif