Skip to content

Commit 0ac8438

Browse files
committed
fix: Fettling - attempting to mock the avr headers
1 parent 911ad90 commit 0ac8438

File tree

2 files changed

+18
-2
lines changed

2 files changed

+18
-2
lines changed

.arduino-ci.cpp

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
#define ARDUINO_CI 1
2+
3+
// Mock implementation of CRC16 for testing
4+
extern "C" uint16_t _crc16_update(uint16_t crc, uint8_t data) {
5+
uint8_t i;
6+
crc ^= data;
7+
for (i = 0; i < 8; ++i) {
8+
if (crc & 1)
9+
crc = (crc >> 1) ^ 0xA001;
10+
else
11+
crc = (crc >> 1);
12+
}
13+
return crc;
14+
}

.arduino-ci.yml

+4-2
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ compile:
77

88
unittest:
99
platforms:
10-
- uno
10+
- uno
1111
libraries:
12-
- "OneWire"
12+
- "OneWire"
13+
mocks:
14+
- crc16.h

0 commit comments

Comments
 (0)