File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -64,19 +64,14 @@ jobs:
6464
6565 build-arm64 :
6666 name : Build (ARM64)
67- runs-on : ubuntu-22.04
68- container :
69- image : ubuntu:22.04
70- # request ARM64 emulation — GitHub runners will use qemu for multiarch containers
71- options : --platform linux/arm64
72-
67+ runs-on : ubuntu-22.04-arm64 # native ARM64 runner beta support
7368 steps :
7469 - uses : actions/checkout@v4
7570
7671 - name : Install dependencies
7772 run : |
78- apt-get update
79- apt-get install -y cmake ninja-build gcc g++ libc6-dev
73+ sudo apt-get update
74+ sudo apt-get install -y cmake ninja-build gcc g++ libc6-dev
8075
8176 - name : Configure
8277 run : cmake -S . -B build -G Ninja -DBUILD_TESTING=ON
Original file line number Diff line number Diff line change 66#include <stdio.h>
77#include <stdint.h>
88#include <sys/types.h>
9+ #include <unistd.h>
910#include "linux_wire.h"
1011
1112int main (void )
Original file line number Diff line number Diff line change 66#include <stdio.h>
77#include <stdint.h>
88#include <sys/types.h>
9+ #include <unistd.h>
910#include "linux_wire.h"
1011
1112int main (void )
Original file line number Diff line number Diff line change 33 * Sends a byte to a device and reads the response (expected multiply result).
44 */
55
6+ #define _POSIX_C_SOURCE 199309L
67#include <stdio.h>
78#include <stdint.h>
89#include <sys/types.h>
10+ #include <unistd.h>
911#include <time.h>
1012#include "linux_wire.h"
1113
Original file line number Diff line number Diff line change 66#include <stdio.h>
77#include <stdint.h>
88#include <sys/types.h>
9+ #include <unistd.h>
910#include "linux_wire.h"
1011
1112static const uint16_t DEVICE_ADDR = 0x40 ;
Original file line number Diff line number Diff line change 66#include <stdio.h>
77#include <stdint.h>
88#include <sys/types.h>
9+ #include <unistd.h>
910#include "linux_wire.h"
1011
1112static const uint16_t DEVICE_ADDR = 0x40 ;
Original file line number Diff line number Diff line change 11#include < cstdio>
2- #include < time.h>
2+ #include < thread>
3+ #include < chrono>
34#include " Wire.h"
45
56/*
@@ -33,8 +34,7 @@ int main()
3334 }
3435
3536 // Wait briefly to allow the Nano to process the value (~1ms)
36- struct timespec ts = { .tv_sec = 0 , .tv_nsec = 1000 * 1000 };
37- nanosleep (&ts, NULL );
37+ std::this_thread::sleep_for (std::chrono::milliseconds (1 ));
3838
3939 // Request 1 byte back
4040 uint8_t count = Wire.requestFrom (DEVICE_ADDR, (uint8_t )1 );
You can’t perform that action at this time.
0 commit comments