Skip to content

Commit c834ce4

Browse files
authored
Merge branch 'develop' into add_vbus_vsys_example
2 parents 731cea2 + 0da9d45 commit c834ce4

File tree

80 files changed

+1357
-475
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

80 files changed

+1357
-475
lines changed

.github/workflows/cmake.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,4 +57,4 @@ jobs:
5757
working-directory: ${{github.workspace}}/pico-examples/build
5858
shell: bash
5959
# Execute the build. You can specify a specific target with "--target <NAME>"
60-
run: cmake --build . --config $BUILD_TYPE --parallel ${{steps.core_count.outputs.output}}
60+
run: cmake --build . --config $BUILD_TYPE --parallel $(nproc)

.github/workflows/multi-gcc.yml

Lines changed: 28 additions & 32 deletions
Large diffs are not rendered by default.

CMakeLists.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,10 @@ add_subdirectory(hello_world)
2828
add_compile_options(-Wall
2929
-Wno-format # int != int32_t as far as the compiler is concerned because gcc has int32_t as long int
3030
-Wno-unused-function # we have some for the docs that aren't called
31-
-Wno-maybe-uninitialized
3231
)
32+
if (CMAKE_C_COMPILER_ID STREQUAL "GNU")
33+
add_compile_options(-Wno-maybe-uninitialized)
34+
endif()
3335

3436
# Hardware-specific examples in subdirectories:
3537
add_subdirectory(adc)

README.md

Lines changed: 107 additions & 103 deletions
Large diffs are not rendered by default.

adc/adc_console/adc_console.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ int main(void) {
7272
printf("%03x\n", sample_buf[i]);
7373
break;
7474
}
75-
case 'w':
75+
case 'w': {
7676
printf("\nPress any key to stop wiggling\n");
7777
int i = 1;
7878
gpio_set_dir_all_bits(-1);
@@ -85,6 +85,7 @@ int main(void) {
8585
gpio_set_dir_all_bits(0);
8686
printf("Wiggling halted.\n");
8787
break;
88+
}
8889
case '\n':
8990
case '\r':
9091
break;

adc/dma_capture/dma_capture.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ int main() {
110110
// ----------------------------------------------------------------------------
111111
// Code for driving the "DAC" output for us to measure
112112

113-
// Core 1 is just going to sit and drive samples out continously. PIO provides
113+
// Core 1 is just going to sit and drive samples out continuously. PIO provides
114114
// consistent sample frequency.
115115

116116
#define OUTPUT_FREQ_KHZ 5

adc/microphone_adc/microphone_adc.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,4 @@ int main() {
4444
printf("%.2f\n", adc_raw * ADC_CONVERT);
4545
sleep_ms(10);
4646
}
47-
48-
return 0;
4947
}

adc/onboard_temperature/onboard_temperature.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,4 @@ int main() {
5858
#endif
5959
sleep_ms(990);
6060
}
61-
62-
return 0;
6361
}

dma/sniff_crc/sniff_crc.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ int main() {
8989
dma_channel_wait_for_finish_blocking(chan);
9090

9191
uint32_t sniffed_crc = dma_sniffer_get_data_accumulator();
92-
printf("Completed DMA sniff of %d byte buffer, DMA sniff accumulator value: 0x%lx\n", TOTAL_LEN, sniffed_crc);
92+
printf("Completed DMA sniff of %d byte buffer, DMA sniff accumulator value: 0x%x\n", TOTAL_LEN, sniffed_crc);
9393

9494
if (0ul == sniffed_crc) {
9595
printf("CRC32 check is good\n");

flash/cache_perfctr/flash_cache_perfctr.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,9 @@ int main() {
7979
printf("Hit rate so far: %.1f%%\n", hit * 100.f / access);
8080

8181
printf("Calculate 25th fibonacci number: %d\n", recursive_fibonacci(25));
82-
printf("New hit rate after printf and fibonacci: %.1f%%\n", xip_ctrl_hw->ctr_hit * 100.f / xip_ctrl_hw->ctr_acc);
82+
uint32_t ctr_hit = xip_ctrl_hw->ctr_hit;
83+
uint32_t ctr_acc = xip_ctrl_hw->ctr_acc;
84+
printf("New hit rate after printf and fibonacci: %.1f%%\n", ctr_hit * 100.f / ctr_acc);
8385

8486
check_hit_miss_invalidate();
8587

0 commit comments

Comments
 (0)