view fluid-mnf/target.h @ 314:147b8c609300

frbl/reconst/main/sys_types.h: import from TCS211
author Mychaela Falconia <falcon@freecalypso.org>
date Wed, 04 Mar 2020 23:12:22 +0000
parents 9cecc930d78f
children 37b5f94de802
line wrap: on
line source

/******************************************************************************
 * FLUID (Flash Loader Utility Independent of Device)
 *
 * Copyright Texas Instruments, 2001.
 * Mads Meisner-Jensen, mmj@ti.com.
 *
 * Target Connection and Control
 *
 * $Id: target.h 1.8 Thu, 01 Aug 2002 11:17:20 +0200 mmj $
 *
 ******************************************************************************/


int target_uart_baudrate_divider_get(int clk, int bps);

int target_driver_init(int uart, int baudrate, char *flowcontrol);
int target_driver_baudrate(int baudrate);

int target_send(char *buf, int size);
int target_putchar(char ch);

int target_wait(int size, int time);
int target_recv(void *buf, int size);
int target_getchar(void);
int target_expect_char(char ch, int time);
void target_recv_reset(void);

int buf_put1(char *buf, unsigned char);
int buf_put2(char *buf, unsigned short data);
int buf_put4(char *buf, unsigned int data);
int buf_put2no(char *buf, unsigned short data);
int buf_put4no(char *buf, unsigned int data);

void error_proto(char ch, char chx);

void target_power(char state);
void target_reset(char state);

int target_trace_enable(int flag);
int target_trace(unsigned char ch);