7#ifndef _PICO_PLATFORM_H_
8#define _PICO_PLATFORM_H_
10#include "hardware/platform_defs.h"
23#define __not_in_flash(group)
24#define __not_in_flash_func(func) func
25#define __no_inline_not_in_flash_func(func)
26#define __in_flash(group)
27#define __scratch_x(group)
28#define __scratch_y(group)
31#define __packed __attribute__((packed))
32#define __packed_aligned __packed __attribute((aligned))
36#define __packed_aligned
39#define __time_critical_func(x) x
40#define __after_data(group)
51#define __noreturn __attribute((noreturn))
55#define __unused __attribute__((unused))
59#define __noinline __attribute__((noinline))
63#define __aligned(x) __attribute__((aligned(x)))
66#define PICO_WEAK_FUNCTION_DEF(x) _Pragma(__STRING(weak x))
67#define PICO_WEAK_FUNCTION_IMPL_NAME(x) x
71#define __noreturn __declspec(noreturn)
79#define __noinline __declspec(noinline)
83#define __aligned(x) __declspec(align(x))
87#define __CONCAT(x,y) x ## y
90#define __thread __declspec( thread )
92#define PICO_WEAK_FUNCTION_DEF(x) __pragma(comment(linker, __STRING(/alternatename:_##x=_##x##__weak)));
93#define PICO_WEAK_FUNCTION_IMPL_NAME(x) x ## __weak
95static __noreturn
void __builtin_unreachable() {
99#define __builtin_clz __lzcnt
103#define count_of(a) (sizeof(a)/sizeof((a)[0]))
107#define MAX(a, b) ((a)>(b)?(a):(b))
111#define MIN(a, b) ((b)>(a)?(a):(b))
119void __noreturn
panic(
const char *fmt, ...);
122#define sem_init sem_init_alternative
124extern uint32_t host_safe_hw_ptr_impl(uintptr_t x);
128#define host_safe_hw_ptr(x) host_safe_hw_ptr_impl((uintptr_t)(x))
129void *decode_host_safe_hw_ptr(uint32_t ptr);
131#define __fast_mul(a,b) ((a)*(b))
133typedef unsigned int uint;