This repository has been archived by the owner on Feb 17, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Felix "xq" Queißner
committed
Sep 23, 2023
1 parent
2b4034f
commit 15ea395
Showing
4 changed files
with
34 additions
and
62 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,15 @@ | ||
const std = @import("std"); | ||
const microzig = @import("microzig"); | ||
|
||
// LED is PB5 | ||
const port = microzig.chip.peripherals.PORTB; | ||
|
||
pub fn main() void { | ||
port.DDRB |= (1 << 5); | ||
port.PORTB |= 0x00; | ||
|
||
while (true) { | ||
microzig.core.experimental.debug.busy_sleep(1_000); | ||
port.PINB |= (1 << 5); | ||
} | ||
} |
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 |
---|---|---|
@@ -1,4 +1,5 @@ | ||
# Examples for the BSP `nxp-lpc` | ||
|
||
- [Blinky](src/blinky.zig) on [mbed LPC1768](https://os.mbed.com/platforms/mbed-LPC1768/) | ||
Performs a really basic round robin blinky on the four LEDs on the development board. Flash by copying `zig-out/firmware/mbed-lpc1768_blinky.hex` to the mass storage of the board, then press the big button in the center. | ||
- [Blinky](src/blinky.zig) on [nRF52840 Dongle](https://www.nordicsemi.com/Products/Development-hardware/nrf52840-dongle) | ||
TODO: Implement this! | ||
|