Primary Bootloader (before u-boot) in sysmoBTSv2
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

48 lines
1.4 KiB

/*
* uart.h - UART Rx and Tx definitions
*
* Copyright (C) 2008 Hugo Villeneuve <hugo@hugovil.com>
*
* Based on TI DaVinci Flash and Boot Utilities, original copyright follows:
* Copyright 2008 Texas Instruments, Inc. <www.ti.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
*/
#ifndef _UART_H_
#define _UART_H_
#include "common.h"
struct uart_ack_header_t {
uint32_t magic;
uint32_t entry_point;
uint32_t size;
uint8_t *recv_buffer;
uint8_t *inflate_dstbuf;
};
void uart_boot(uint32_t *jump_entry_point);
void uart_send_lf(void);
void uart_send_str(char *string);
void uart_send_str_lf(char *string);
void uart_send_hexnum(uint32_t value, int digits);
int uart_get_cmd(uint32_t *boot_cmd);
uint32_t uart_get_prog(struct uart_ack_header_t *uart_ack_header);
#endif /* _UART_H_ */