FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
Arduino/libraries/BoolArray/BoolArray.h at master · gunstr/Arduino · GitHub
gunstr
/
Arduino
Public
forked from
RobTillaart/Arduino
Notifications
You must be signed in to change notification settings
Fork
0
Star
0
Code
Pull requests
0
Actions
Projects
Wiki
Security and quality
0
Insights
Additional navigation options
Code
Pull requests
Actions
Projects
Wiki
Security and quality
Insights
Expand file tree
Breadcrumbs
Arduino
/
libraries
/
BoolArray
/
BoolArray.h
Copy path
More file actions
More file actions
Latest commit
History
History
History
47 lines (41 loc) · 1.04 KB
Breadcrumbs
Arduino
/
libraries
/
BoolArray
/
BoolArray.h
Copy path
File metadata and controls
47 lines (41 loc) · 1.04 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
#
ifndef
BoolArray_H
#
define
BoolArray_H
//
//
FILE: BoolArray.h
//
AUTHOR: Rob dot Tillaart at gmail dot com
//
VERSION: 0.1.3
//
PURPOSE: BoolArray library for Arduino
//
HISTORY: See BoolArray.cpp
//
//
Released to the public domain
//
//
BoolArray implement a compact array of booleans of max size 2000.
//
For larger arrays one need to modify the code, or use BitArray.
//
#
if
defined(ARDUINO) && ARDUINO >= 100
#
include
"
Arduino.h
"
#
else
#
include
"
WProgram.h
"
#
endif
#
define
BOOLARRAY_LIB_VERSION
"
0.1.3
"
#
define
BOOLARRAY_MAXSIZE
(
250
*
8
)
#
define
BOOLARRAY_OK
0x00
#
define
BOOLARRAY_ERROR
0xFF
#
define
BOOLARRAY_SIZE_ERROR
0xFE
#
define
BOOLARRAY_INIT_ERROR
0xFD
class
BoolArray
{
public:
BoolArray
();
~BoolArray
();
uint8_t
begin
(
const
uint16_t
size);
uint8_t
clear
();
uint8_t
setAll
(
const
uint8_t
value);
uint8_t
get
(
const
uint16_t
idx);
uint8_t
set
(
const
uint16_t
idx,
const
uint8_t
value);
uint8_t
toggle
(
const
uint16_t
idx);
private:
uint8_t
* _ar;
uint16_t
_size;
};
#
endif
Back
|
FazBrowse Home
|
New Git URL