-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Start adding docs, improve build API
- Loading branch information
1 parent
a0b1714
commit ad7a01d
Showing
8 changed files
with
101 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# Introduction | ||
|
||
This guide will help you get up and running with the badge and fittingly help introduce you to other attendees. | ||
|
||
## Running | ||
|
||
## On the simulator | ||
|
||
The simulator is ideal for fast iteration as it supports live reloading. | ||
|
||
Run `zig build watch` and head to https://badgesim.microzig.tech/. | ||
|
||
## On hardware | ||
|
||
Once you're happy with what you've made, you'll need to flash it onto your badge! | ||
|
||
TODO |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
const std = @import("std"); | ||
const badge = @import("sycl-badge"); | ||
|
||
pub fn build(b: *std.Build) void { | ||
const dep = b.dependency("sycl-badge", .{}); | ||
const feature_test_cart = badge.add_cart(dep, b, .{ | ||
.name = "hello", | ||
.optimize = .ReleaseSmall, | ||
.root_source_file = .{ .path = "hello.zig" }, | ||
}); | ||
const watch_run_step = feature_test_cart.install_with_watcher(dep, b); | ||
|
||
const watch_step = b.step("watch", ""); | ||
watch_step.dependOn(&watch_run_step.step); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
.{ | ||
.name = "sycl-badge-introduction", | ||
.version = "0.0.0", | ||
.paths = .{ | ||
"hello.zig", | ||
"build.zig", | ||
}, | ||
|
||
.dependencies = .{ | ||
.@"sycl-badge" = .{ | ||
.path = "../..", | ||
}, | ||
}, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
const cart = @import("cart-api"); | ||
|
||
export fn update() void { | ||
// Set background to a nice gray | ||
@memset(cart.framebuffer, cart.DisplayColor{ | ||
.red = 10, | ||
.green = 20, | ||
.blue = 10, | ||
}); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters