-
Notifications
You must be signed in to change notification settings - Fork 847
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
1 parent
c95295f
commit 7fe60d6
Showing
171 changed files
with
25,048 additions
and
562 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,5 +3,6 @@ | |
_deps | ||
cmake-* | ||
build | ||
build-* | ||
.DS_Store | ||
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 |
---|---|---|
@@ -1,9 +1,11 @@ | ||
if (NOT PICO_NO_HARDWARE) | ||
add_subdirectory(adc_console) | ||
add_subdirectory(dma_capture) | ||
add_subdirectory(hello_adc) | ||
add_subdirectory(joystick_display) | ||
add_subdirectory(onboard_temperature) | ||
add_subdirectory(microphone_adc) | ||
add_subdirectory(read_vsys) | ||
endif () | ||
if (TARGET hardware_adc) | ||
add_subdirectory_exclude_platforms(adc_console) | ||
add_subdirectory_exclude_platforms(dma_capture) | ||
add_subdirectory_exclude_platforms(hello_adc) | ||
add_subdirectory_exclude_platforms(joystick_display) | ||
add_subdirectory_exclude_platforms(onboard_temperature) | ||
add_subdirectory_exclude_platforms(microphone_adc) | ||
add_subdirectory_exclude_platforms(read_vsys) | ||
else() | ||
message("Skipping ADC examples as hardware_adc is unavailable on this platform") | ||
endif() |
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
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,12 @@ | ||
add_executable(blink_simple | ||
blink_simple.c | ||
) | ||
|
||
# pull in common dependencies | ||
target_link_libraries(blink_simple pico_stdlib) | ||
|
||
# create map/bin/hex/uf2 file etc. | ||
pico_add_extra_outputs(blink_simple) | ||
|
||
# call pico_set_program_url to set path to example on github, so users can find the source for an example via picotool | ||
example_auto_set_url(blink_simple) |
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,39 @@ | ||
/** | ||
* Copyright (c) 2020 Raspberry Pi (Trading) Ltd. | ||
* | ||
* SPDX-License-Identifier: BSD-3-Clause | ||
*/ | ||
|
||
#include "pico/stdlib.h" | ||
|
||
#ifndef LED_DELAY_MS | ||
#define LED_DELAY_MS 250 | ||
#endif | ||
|
||
// Initialize the GPIO for the LED | ||
void pico_led_init(void) { | ||
#ifdef PICO_DEFAULT_LED_PIN | ||
// A device like Pico that uses a GPIO for the LED will define PICO_DEFAULT_LED_PIN | ||
// so we can use normal GPIO functionality to turn the led on and off | ||
gpio_init(PICO_DEFAULT_LED_PIN); | ||
gpio_set_dir(PICO_DEFAULT_LED_PIN, GPIO_OUT); | ||
#endif | ||
} | ||
|
||
// Turn the LED on or off | ||
void pico_set_led(bool led_on) { | ||
#if defined(PICO_DEFAULT_LED_PIN) | ||
// Just set the GPIO on or off | ||
gpio_put(PICO_DEFAULT_LED_PIN, led_on); | ||
#endif | ||
} | ||
|
||
int main() { | ||
pico_led_init(); | ||
while (true) { | ||
pico_set_led(true); | ||
sleep_ms(LED_DELAY_MS); | ||
pico_set_led(false); | ||
sleep_ms(LED_DELAY_MS); | ||
} | ||
} |
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 @@ | ||
add_subdirectory_exclude_platforms(encrypted host rp2040 rp2350-riscv) |
Oops, something went wrong.