| 31 | |
| 32 | |
| 33 | uint8_t nibbleArray::get(const uint16_t index) |
| 34 | { |
| 35 | if (index > _size) |
| 36 | { |
| 37 | return NIBBLEARRAY_ERROR_INDEX; // disable this check for more speed |
| 38 | } |
| 39 | if (index & 1) return _arr[index/2] & 0x0F; |
| 40 | return _arr[index/2] >> 4; |
| 41 | } |
| 42 | |
| 43 | |
| 44 | uint8_t nibbleArray::set(const uint16_t index, uint8_t value) |