Skip to content

Commit 893c141

Browse files
committed
0.2.9 BitArray
1 parent 2156c60 commit 893c141

26 files changed

+578
-355
lines changed

libraries/BitArray/.arduino-ci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,9 @@ compile:
2020
# - due
2121
# - zero
2222
# - leonardo
23-
- m4
23+
# - m4
2424
- esp32
25-
- esp8266
25+
# - esp8266
2626
# - mega2560
2727
- rpipico
2828
libraries:

libraries/BitArray/.github/workflows/arduino-lint.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ jobs:
66
runs-on: ubuntu-latest
77
timeout-minutes: 5
88
steps:
9-
- uses: actions/checkout@v4
10-
- uses: arduino/arduino-lint-action@v1
9+
- uses: actions/checkout@v5
10+
- uses: arduino/arduino-lint-action@v2
1111
with:
1212
library-manager: update
1313
compliance: strict

libraries/BitArray/.github/workflows/arduino_test_runner.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ jobs:
88
timeout-minutes: 20
99

1010
steps:
11-
- uses: actions/checkout@v4
11+
- uses: actions/checkout@v5
1212
- uses: ruby/setup-ruby@v1
1313
with:
1414
ruby-version: 2.6

libraries/BitArray/.github/workflows/jsoncheck.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,15 @@ on:
55
paths:
66
- '**.json'
77
pull_request:
8+
paths:
9+
- '**.json'
810

911
jobs:
1012
test:
1113
runs-on: ubuntu-latest
1214
timeout-minutes: 5
1315
steps:
14-
- uses: actions/checkout@v4
16+
- uses: actions/checkout@v5
1517
- name: json-syntax-check
1618
uses: limitusus/json-syntax-check@v2
1719
with:

libraries/BitArray/BitArray.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
//
22
// FILE: BitArray.cpp
33
// AUTHOR: Rob Tillaart
4-
// VERSION: 0.2.8
4+
// VERSION: 0.2.9
55
// PURPOSE: BitArray library for Arduino
66
// URL: https://github.com/RobTillaart/BitArray
77
// http://forum.arduino.cc/index.php?topic=361167

libraries/BitArray/BitArray.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
//
33
// FILE: bitArray.h
44
// AUTHOR: Rob Tillaart
5-
// VERSION: 0.2.8
5+
// VERSION: 0.2.9
66
// PURPOSE: BitArray library for Arduino
77
// URL: https://github.com/RobTillaart/BitArray
88

@@ -20,7 +20,7 @@
2020

2121
#include "Arduino.h"
2222

23-
#define BITARRAY_LIB_VERSION (F("0.2.8"))
23+
#define BITARRAY_LIB_VERSION (F("0.2.9"))
2424

2525

2626
#define BA_SEGMENT_SIZE 200

libraries/BitArray/CHANGELOG.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,15 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/)
66
and this project adheres to [Semantic Versioning](http://semver.org/).
77

88

9-
## [0.2.8] - 2024-04-09
9+
## [0.2.9] - 2025-11-22
1010
- update GitHub actions
11+
- update examples + rename
12+
- update readme.md
1113
- minor edits
1214

15+
## [0.2.8] - 2024-04-09
16+
- update GitHub actions
17+
- minor edits
1318

1419
## [0.2.7] - 2023-10-18
1520
- update readme.md

libraries/BitArray/LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MIT License
22

3-
Copyright (c) 2015-2024 Rob Tillaart
3+
Copyright (c) 2015-2025 Rob Tillaart
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

libraries/BitArray/README.md

Lines changed: 27 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ into multiple bytes, and byte borders. Depending where an element is located wri
2626
can take more time. You need to check if your application needs more performance than
2727
this library can deliver.
2828

29-
#### Related
29+
### Related
3030

3131
The BitArray library is one from a set of three:
3232

@@ -35,14 +35,15 @@ The BitArray library is one from a set of three:
3535
- https://github.com/RobTillaart/nibbleArray for elements of 4 bits or smaller (values 0 .. 15).
3636

3737

38-
#### Notes
38+
### Notes
3939

4040
The BitArray class allocates dynamic memory, so called BA_SEGMENTS,
4141
each of 200 bytes.
4242
As the memory size of different processors differ the maximum amount of SEGMENTS
4343
depends on architecture.
4444

45-
The library is tested on AVR architecture only.
45+
The library is tested on AVR architecture only. On other processors e.g. ESP32 and RPI pico
46+
one might use a different implementation as continuous memory is possible.
4647

4748

4849
## Interface
@@ -52,27 +53,41 @@ The library is tested on AVR architecture only.
5253

5354
```
5455

55-
#### Constructor
56+
### Constructor
5657

57-
- **BitArray()** Constructor
58-
- **~BitArray()** Destructor, frees dynamic memory
59-
- **uint8_t begin(const uint8_t bits, const uint16_t size)** Frees memory used and allocates the memory requested.
58+
- **BitArray()** Constructor.
59+
- **~BitArray()** Destructor, frees dynamic memory.
60+
- **uint8_t begin(const uint8_t bits, const uint16_t size)**
61+
Frees memory used and allocates the memory requested.
6062
The maximum number of elements is 65535 if memory allows,
6163
the maximum element size is 32.
64+
Returns an error-code or **BA_OK**.
6265

63-
Better names could be **bits == elementSize** and **size == elementCount**.
66+
Better names could be **bits ==> elementSize** and **size ==> elementCount**.
6467

6568

66-
#### Admin
69+
### Administrative
6770

6871
- **uint16_t capacity()** idem.
6972
- **uint16_t memory()** idem.
7073
- **uint16_t bits()** idem.
7174
- **uint16_t segments()** idem.
75+
76+
### Error
77+
7278
- **uint8_t getError()** idem.
7379

80+
| Error | value | Notes |
81+
|:----------------------|:------------:|:--------|
82+
| BA_ERR | 0xFFFFFFFF |
83+
| BA_OK | 0x00 |
84+
| BA_NO_MEMORY_ERR | 0x01 |
85+
| BA_IDX_RANGE_ERR | 0x02 |
86+
| BA_ELEMENT_SIZE_ERR | 0x03 |
87+
| BA_SIZE_ERR | 0x04 |
7488

75-
#### base functions
89+
90+
### base functions
7691

7792
- **void clear()** sets all elements to 0.
7893
- **uint32_t get(const uint16_t index)** gets the value of the element at index.
@@ -97,13 +112,13 @@ Return value is maxValue (debug info).
97112
- return value **toggle()** could be new value? (0.3.0)
98113
- code prep is working (commented for now)
99114
- naming parameters ** begin()** (0.3.0)
100-
115+
- elementSize, elementCount
101116

102117
#### Could
103118

104119
- functional examples.
105120
- investigate element size of 64 (for doubles) and beyond.
106-
- move code to .cpp (0.3.0)
121+
- move code to .cpp (0.3.0), needed?
107122

108123

109124
#### Wont

libraries/BitArray/examples/bitArrayDemo0/bitArrayDemo0.ino

Lines changed: 0 additions & 110 deletions
This file was deleted.

0 commit comments

Comments
 (0)