|
| 1 | +/* uart_flash.h |
| 2 | + * |
| 3 | + * Generic implementation of the read/write/erase |
| 4 | + * functionalities, on top of the uart_drv_*.h HAL. |
| 5 | + * |
| 6 | + * Compile with UART_FLASH=1 |
| 7 | + * |
| 8 | + * Use tools/ufserver on the host to provide a remote |
| 9 | + * emulated non-volatile image via UART. |
| 10 | + * |
| 11 | + * |
| 12 | + * Copyright (C) 2020 wolfSSL Inc. |
| 13 | + * |
| 14 | + * This file is part of wolfBoot. |
| 15 | + * |
| 16 | + * wolfBoot is free software; you can redistribute it and/or modify |
| 17 | + * it under the terms of the GNU General Public License as published by |
| 18 | + * the Free Software Foundation; either version 2 of the License, or |
| 19 | + * (at your option) any later version. |
| 20 | + * |
| 21 | + * wolfBoot is distributed in the hope that it will be useful, |
| 22 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 23 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 24 | + * GNU General Public License for more details. |
| 25 | + * |
| 26 | + * You should have received a copy of the GNU General Public License |
| 27 | + * along with this program; if not, write to the Free Software |
| 28 | + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA |
| 29 | + */ |
| 30 | + |
| 31 | +#ifndef UART_FLASH_DRI_H |
| 32 | +#define UART_FLASH_DRI_H |
| 33 | +#include <stdint.h> |
| 34 | + |
| 35 | +#ifdef UART_FLASH |
| 36 | +int uart_init(uint32_t bitrate, uint8_t data, char parity, uint8_t stop); |
| 37 | +void uart_send_current_version(void); |
| 38 | +#else |
| 39 | +#define uart_init(...) (-1) |
| 40 | +#define uart_send_current_version() do{}while(0) |
| 41 | +#endif /* UART_FLASH */ |
| 42 | + |
| 43 | +#endif /* !UART_FLASH_DRI_H */ |
0 commit comments