view fluid-mnf/target.h @ 362:b4fb0c7dfdf4

fluid-mnf: added -oC option to use cmd39.m0 for Calypso C05
author Mychaela Falconia <falcon@freecalypso.org>
date Sat, 14 Mar 2020 19:44:44 +0000
parents 37b5f94de802
children
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(char *ttyport, int baudrate);
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);