mirror of
https://github.com/ziglang/zig.git
synced 2025-12-31 18:43:18 +00:00
And fix test cases to make them pass. This is in preparation for starting to pass behavior tests with self-hosted.
16 lines
311 B
Zig
16 lines
311 B
Zig
const nrfx_uart_t = extern struct {
|
|
p_reg: [*c]u32,
|
|
drv_inst_idx: u8,
|
|
};
|
|
|
|
pub fn nrfx_uart_rx(p_instance: [*c]const nrfx_uart_t) void {}
|
|
|
|
threadlocal var g_uart0 = nrfx_uart_t{
|
|
.p_reg = 0,
|
|
.drv_inst_idx = 0,
|
|
};
|
|
|
|
test "reference a global threadlocal variable" {
|
|
_ = nrfx_uart_rx(&g_uart0);
|
|
}
|