2020-04-02 23:48:27 +02:00
|
|
|
/* SPDX-License-Identifier: GPL-2.0-only */
|
2017-05-11 16:36:29 +02:00
|
|
|
|
|
|
|
#ifndef CONSOLE_FLASH_H
|
|
|
|
#define CONSOLE_FLASH_H 1
|
|
|
|
|
|
|
|
#include <stdint.h>
|
|
|
|
|
|
|
|
void flashconsole_init(void);
|
|
|
|
void flashconsole_tx_byte(unsigned char c);
|
|
|
|
void flashconsole_tx_flush(void);
|
|
|
|
|
2019-03-06 01:53:33 +01:00
|
|
|
#define __CONSOLE_FLASH_ENABLE__ CONFIG(CONSOLE_SPI_FLASH)
|
2017-05-11 16:36:29 +02:00
|
|
|
|
|
|
|
#if __CONSOLE_FLASH_ENABLE__
|
|
|
|
static inline void __flashconsole_init(void) { flashconsole_init(); }
|
|
|
|
static inline void __flashconsole_tx_byte(u8 data)
|
|
|
|
{
|
|
|
|
flashconsole_tx_byte(data);
|
|
|
|
}
|
|
|
|
static inline void __flashconsole_tx_flush(void)
|
|
|
|
{
|
|
|
|
flashconsole_tx_flush();
|
|
|
|
}
|
|
|
|
#else
|
|
|
|
static inline void __flashconsole_init(void) {}
|
|
|
|
static inline void __flashconsole_tx_byte(u8 data) {}
|
|
|
|
static inline void __flashconsole_tx_flush(void) {}
|
|
|
|
#endif /* __CONSOLE_FLASH_ENABLE__ */
|
|
|
|
|
|
|
|
#endif /* CONSOLE_FLASH_H */
|