Dayah-
I asked you before, please post to the group, not to me. I cannot help you
unless
you post to the group.
-Jeff
-------- Original Message --------
Subject: How to use the HPI to connect it to external devices ?
Date: Thu, 7 Feb 2008 23:32:08 -0800 (PST)
From: dayah nuru
To: Jeff Brower
Hi, I found this code from website....my problem is when I run this code, it
can't
detect the regs54xx.h file because the file wasn't in the library. This
problem I
settled by searching the file in internet. So, that file I already got. There
is
#include in the regs54xx.h file. This file I can't find from
internet. I only
found the regs.h for C6x. I used tms320vc5416 for my project. So, where I can
find
the file ? If I don't put the regs.h, there will be errors. Hope you can
help me. Or
you have any example for using the HPI pin ? I really need it. Thanks.
-----------------------
/*********************************************************************/
/* hpi.h v0.00 */
/* Copyright (c) 1997 Texas Instruments Incorporated */
/*********************************************************************/
/*********************************************************************/
/* This header defines the macros, symbols, fuctions that are needed */
/* for accessing functions of the Host Port Interface (HPI). */
/* The MACROS defined here are dependent on the symbol definitions */
/* contained in regs.h. */
/*********************************************************************/
#include
#include
/*********************************************************************/
/* INCLUDE MEMORY-MAPPED REGISTER DEFINITIONS */
/*********************************************************************/
#include
"regs54xx.h"/*********************************************************************/
/* Define HPI interface constants */
/* */
/* NO_HPI_PINS - Number of configurable HPI pins */
/*********************************************************************/#define
NO_HPI_PINS
16/*********************************************************************/
/* ENABLE_HPI_MEM - enables C54x cpu access to shared host memory */
/*********************************************************************/
#define ENABLE_HPI_MEM\
HPIC
|MASK_BIT(SMOD)/*********************************************************************/
/* DISABLE_HPI_MEM - disables C54x cpu access to shared host memory */
/*********************************************************************/
#define DISABLE_HPI_MEM\
HPIC
&~MASK_BIT(SMOD)/*********************************************************************/
/* HOST_INTERRUPT - posts interrupt to host */
/*********************************************************************/
#define HOST_INTERRUPT\
HPIC
|MASK_BIT(HINT)/*********************************************************************/
/* Function Prototypes */
/* */
/* reset_hpi_config - initialize HPI config data structures */
/* config_host_ctrl_pin - configure HPI host control pin */
/* config_host_data_bus - configure HPI HD0-HD7 data bus */
/* init_hpi - initialize HPI interface */
/*********************************************************************/
void reset_hpi_config(unsigned int max);
int config_host_ctrl_pin(short pin, void *addr, short bit, short rw,
short inv, unsigned int delay);
int config_host_data_bus(void *addr, short bit);
int init_hpi(short bob, void *hpi_addr);
int write_hpi_data(char *val, void *hpi_addr, unsigned int no_items,
unsigned int size, short autoinc);
int get_hpi_data(char *val, void *hpi_addr, unsigned int no_items,
unsigned int size, short autoinc);
int client_interrupt();
int clear_client_interrupt();
int set_hpi_addr(void *addr);
static void write_hpi_ctrl(unsigned short ctrl);
unsigned int read_data(void);
---------------------
Regards,Dayah
Jeff Brower wrote:
Dayah-
Please post your question to the c6x Yahoo Group.
-Jeff
dayah_nuru wrote:
>
> Hi,
>
> This is my c coding to configure gpio as output to connect it to a
> stepper motor. This program have error. Can you help me to provide the
> correct coding ? Thanks.
>
> Regards,
> Dayah
[Fwd: How to use the HPI to connect it to external devices ?]
Started by ●February 8, 2008