@web-font-path: "roboto-debian.css";
v2.2.0 (RP2040)
Loading...
Searching...
No Matches
pico_base

Core types and macros for the Raspberry Pi Pico SDK. More...

## Macros

#define | pico_board_cmake_set(x, y)
| A marker used in board headers to specify a CMake variable and value that should be set in the CMake build when the board header is used.
#define | pico_board_cmake_set_default(x, y)
| A marker used in board headers to specify a CMake variable and value that should be set in the CMake build when the board header is used, if that CMake variable has not already been set.

## Enumerations

enum

pico_error_codes {
PICO_OK = 0 , PICO_ERROR_NONE = 0 , PICO_ERROR_GENERIC = -1 , PICO_ERROR_TIMEOUT = -2 ,
PICO_ERROR_NO_DATA = -3 , PICO_ERROR_NOT_PERMITTED = -4 , PICO_ERROR_INVALID_ARG = -5 , PICO_ERROR_IO = -6 ,
PICO_ERROR_BADAUTH = -7 , PICO_ERROR_CONNECT_FAILED = -8 , PICO_ERROR_INSUFFICIENT_RESOURCES = -9 , PICO_ERROR_INVALID_ADDRESS = -10 ,
PICO_ERROR_BAD_ALIGNMENT = -11 , PICO_ERROR_INVALID_STATE = -12 , PICO_ERROR_BUFFER_TOO_SMALL = -13 , PICO_ERROR_PRECONDITION_NOT_MET = -14 ,
PICO_ERROR_MODIFIED_DATA = -15 , PICO_ERROR_INVALID_DATA = -16 , PICO_ERROR_NOT_FOUND = -17 , PICO_ERROR_UNSUPPORTED_MODIFICATION = -18 ,
PICO_ERROR_LOCK_REQUIRED = -19 , PICO_ERROR_VERSION_MISMATCH = -20 , PICO_ERROR_RESOURCE_IN_USE = -21
}

| Common return codes from pico_sdk methods that return a status. More...

## Detailed Description

Core types and macros for the Raspberry Pi Pico SDK.

This header is intended to be included by all source code as it includes configuration headers and overrides in the correct order

This header may be included by assembly code

## Macro Definition Documentation

## pico_board_cmake_set

#define pico_board_cmake_set | ( |  | x,
|  |  | y )

A marker used in board headers to specify a CMake variable and value that should be set in the CMake build when the board header is used.

Based on the PICO_BOARD CMake variable, the build will scan the board header for pico_board_cmake_set(var, value) and set these variables very early in the build configuration process. This allows setting CMake variables like PICO_PLATFORM from the board header, and thus affecting, for example, the choice of compiler made by the build

Note
  use of this macro will overwrite the CMake variable if it is already set
  this macro's definition is empty as it is not intended to have any effect on actual compilation

## pico_board_cmake_set_default

#define pico_board_cmake_set_default | ( |  | x,
|  |  | y )

A marker used in board headers to specify a CMake variable and value that should be set in the CMake build when the board header is used, if that CMake variable has not already been set.

Based on the PICO_BOARD CMake variable, the build will scan the board header for pico_board_cmake_set_default(var, value) and set these variables very early in the build configuration process. This allows setting CMake variables like PICO_PLATFORM from the board header, and thus affecting, for example, the choice of compiler made by the build

Note
  use of this macro will not overwrite the CMake variable if it is already set
  this macro's definition is empty as it is not intended to have any effect on actual compilation

## Enumeration Type Documentation

## pico_error_codes

enum pico_error_codes

Common return codes from pico_sdk methods that return a status.

All PICO_ERROR_ values are negative so they can be returned from functions that also want to return a zero or positive value on success.

Note these error codes may be returned via bootrom functions too.

Enumerator
PICO_OK | No error; the operation succeeded.
PICO_ERROR_NONE | No error; the operation succeeded.
PICO_ERROR_GENERIC | An unspecified error occurred.
PICO_ERROR_TIMEOUT | The function failed due to timeout.
PICO_ERROR_NO_DATA | Attempt for example to read from an empty buffer/FIFO.
PICO_ERROR_NOT_PERMITTED | Permission violation e.g. write to read-only flash partition, or security violation.
PICO_ERROR_INVALID_ARG | Argument is outside of range of supported values`.
PICO_ERROR_IO | An I/O error occurred.
PICO_ERROR_BADAUTH | The authorization failed due to bad credentials.
PICO_ERROR_CONNECT_FAILED | The connection failed.
PICO_ERROR_INSUFFICIENT_RESOURCES | Dynamic allocation of resources failed.
PICO_ERROR_INVALID_ADDRESS | Address argument was out-of-bounds or was determined to be an address that the caller may not access.
PICO_ERROR_BAD_ALIGNMENT | Address was mis-aligned (usually not on word boundary).
PICO_ERROR_INVALID_STATE | Something happened or failed to happen in the past, and consequently we (currently) can't service the request.
PICO_ERROR_BUFFER_TOO_SMALL | A user-allocated buffer was too small to hold the result or working state of this function.
PICO_ERROR_PRECONDITION_NOT_MET | The call failed because another function must be called first.
PICO_ERROR_MODIFIED_DATA | Cached data was determined to be inconsistent with the actual version of the data.
PICO_ERROR_INVALID_DATA | A data structure failed to validate.
PICO_ERROR_NOT_FOUND | Attempted to access something that does not exist; or, a search failed.
PICO_ERROR_UNSUPPORTED_MODIFICATION | Write is impossible based on previous writes; e.g. attempted to clear an OTP bit.
PICO_ERROR_LOCK_REQUIRED | A required lock is not owned.
PICO_ERROR_VERSION_MISMATCH | A version mismatch occurred (e.g. trying to run PIO version 1 code on RP2040).
PICO_ERROR_RESOURCE_IN_USE | The call could not proceed because the required resources were unavailable.