Initial commit
Some checks failed
Build Kernel / Build all affected Kernels (push) Has been cancelled
Build all core packages / Build all core packages for selected target (push) Has been cancelled
Build and Push prebuilt tools container / Build and Push all prebuilt containers (push) Has been cancelled
Build Toolchains / Build Toolchains for each target (push) Has been cancelled
Build host tools / Build host tools for linux and macos based systems (push) Has been cancelled
Coverity scan build / Coverity x86/64 build (push) Has been cancelled
Some checks failed
Build Kernel / Build all affected Kernels (push) Has been cancelled
Build all core packages / Build all core packages for selected target (push) Has been cancelled
Build and Push prebuilt tools container / Build and Push all prebuilt containers (push) Has been cancelled
Build Toolchains / Build Toolchains for each target (push) Has been cancelled
Build host tools / Build host tools for linux and macos based systems (push) Has been cancelled
Coverity scan build / Coverity x86/64 build (push) Has been cancelled
This commit is contained in:
43
target/linux/mpc85xx/image/spi-loader/include/stdio.h
Normal file
43
target/linux/mpc85xx/image/spi-loader/include/stdio.h
Normal file
@@ -0,0 +1,43 @@
|
||||
// SPDX-License-Identifier: BSD-2-Clause
|
||||
/*
|
||||
* Copyright (c) 2022 Matthias Schiffer <mschiffer@universe-factory.net>
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <serial.h>
|
||||
#include <types.h>
|
||||
|
||||
static inline int getchar(void)
|
||||
{
|
||||
return serial_console_getchar();
|
||||
}
|
||||
|
||||
static inline int tstc(void)
|
||||
{
|
||||
return serial_console_tstc();
|
||||
}
|
||||
|
||||
static inline int putchar(char c)
|
||||
{
|
||||
if (c == '\n')
|
||||
serial_console_putchar('\r');
|
||||
serial_console_putchar(c);
|
||||
return 0;
|
||||
}
|
||||
|
||||
int puts(const char *s);
|
||||
|
||||
/* Utility functions */
|
||||
void put_u4(uint8_t v);
|
||||
void put_u8(uint8_t v);
|
||||
void put_u16(uint16_t v);
|
||||
void put_u32(uint32_t v);
|
||||
void put_ptr(const void *p);
|
||||
void put_array(const void *p, size_t l);
|
||||
|
||||
#define put_with_label(label, put, value) do { \
|
||||
puts(label); \
|
||||
put(value); \
|
||||
puts("\n"); \
|
||||
} while (0)
|
||||
Reference in New Issue
Block a user