Skip to content

Commit

Permalink
OK after changing alignment from 4 to 8 bytes
Browse files Browse the repository at this point in the history
  • Loading branch information
lupyuen committed Jul 19, 2022
1 parent 60cea94 commit 4ccb0cd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions sensortest.zig
Original file line number Diff line number Diff line change
Expand Up @@ -491,8 +491,8 @@ const struct_sensor_info = struct {
};

/// Sensor Data Buffer
/// (Aligned to 32 bits because it's passed to C)
var sensor_data align(4) = std.mem.zeroes([256]u8);
/// (Aligned to 8 bytes because it's passed to C)
var sensor_data align(8) = std.mem.zeroes([256]u8);

var g_should_exit: bool = @as(c_int, 0) != 0;

Expand Down

0 comments on commit 4ccb0cd

Please sign in to comment.