v2.0.0
stdlib.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2020 Raspberry Pi (Trading) Ltd.
3 *
4 * SPDX-License-Identifier: BSD-3-Clause
5 */
6
7#ifndef _PICO_STDLIB_H
8#define _PICO_STDLIB_H
9
10#include "pico.h"
11#include "pico/stdio.h"
12#include "pico/time.h"
13#include "hardware/gpio.h"
14#include "hardware/uart.h"
15
16#ifdef __cplusplus
17extern "C" {
18#endif
19
44// Note PICO_STDIO_UART, PICO_STDIO_USB, PICO_STDIO_SEMIHOSTING are set by the
45// respective INTERFACE libraries, so these defines are set if the library
46// is included for the target executable
47
48#if LIB_PICO_STDIO_UART
49#include "pico/stdio_uart.h"
50#endif
51
52#if LIB_PICO_STDIO_USB
53#include "pico/stdio_usb.h"
54#endif
55
56#if LIB_PICO_STDIO_SEMIHOSTING
57#include "pico/stdio_semihosting.h"
58#endif
59
60// PICO_CONFIG: PICO_DEFAULT_LED_PIN, Optionally define a pin that drives a regular LED on the board, default=Usually provided via board header, group=pico_stdlib
61
62// PICO_CONFIG: PICO_DEFAULT_LED_PIN_INVERTED, 1 if LED is inverted or 0 if not, type=int, default=0, group=pico_stdlib
63#ifndef PICO_DEFAULT_LED_PIN_INVERTED
64#define PICO_DEFAULT_LED_PIN_INVERTED 0
65#endif
66
67// PICO_CONFIG: PICO_DEFAULT_WS2812_PIN, Optionally define a pin that controls data to a WS2812 compatible LED on the board, group=pico_stdlib
68// PICO_CONFIG: PICO_DEFAULT_WS2812_POWER_PIN, Optionally define a pin that controls power to a WS2812 compatible LED on the board, group=pico_stdlib
69
85void setup_default_uart(void);
86
87#ifdef __cplusplus
88}
89#endif
90#endif
time.h
gpio.h
setup_default_uart
void setup_default_uart(void)
Set up the default UART and assign it to the default GPIOs.
Definition: stdlib.c:14
pico.h
uart.h
stdio.h