Platform updates (#611)

* Platform updates
 - Add PICO_RP2040=1 to rp2040 builds
 - Add new PICO_RP2040_B0/1/2_SUPPORTED macros and retailer chip specific code to use
 - Add doxygen to platform.h
 - Make pico.h includable from assembly (because header order is important and tricky) - split out platform_asm.h
 - Switch to using PICO_RP2040_B0_SUPPORTED in board headers
This commit is contained in:
Graham Sanderson
2021-10-25 12:26:06 -05:00
committed by GitHub
parent 723dfd04ff
commit e850214938
41 changed files with 431 additions and 277 deletions

View File

@ -8,9 +8,12 @@
#define PICO_H_
/** \file pico.h
* \defgroup pico_base pico_base
*
* Core types and macros for the Raspberry Pi Pico SDK. This header is intended to be included by all source code
* \defgroup pico_base pico_base
*
* 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
*/
#include "pico/types.h"

View File

@ -8,7 +8,7 @@
#define PICO_CONFIG_H_
// -----------------------------------------------------
// NOTE: THIS HEADER IS ALSO INCLUDED BY ASSEMBLER SO
// NOTE: THIS HEADER IS ALSO INCLUDED BY ASSEMBLY CODE SO
// SHOULD ONLY CONSIST OF PREPROCESSOR DIRECTIVES
// OR USE #ifndef __ASSEMBLER__ guards
// -------------

View File

@ -7,6 +7,8 @@
#ifndef _PICO_ERROR_H
#define _PICO_ERROR_H
#ifndef __ASSEMBLER__
/*!
* Common return codes from pico_sdk methods that return a status
*/
@ -18,4 +20,6 @@ enum {
PICO_ERROR_NO_DATA = -3,
};
#endif // !__ASSEMBLER__
#endif

View File

@ -7,6 +7,8 @@
#ifndef _PICO_TYPES_H
#define _PICO_TYPES_H
#ifndef __ASSEMBLER__
#include "pico/assert.h"
#include <stdint.h>
@ -89,3 +91,4 @@ typedef struct {
#define bool_to_bit(x) ((uint)!!(x))
#endif
#endif