Files
templates/c/parallel-nand/include/parallel_nand_port.h

29 lines
702 B
C
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
#ifndef PARALLEL_NAND_PORT_H
#define PARALLEL_NAND_PORT_H
#ifdef __cplusplus
extern "C" {
#endif
/* Один octet хранится в целом типе: это важно для C28x с 16-битным char. */
typedef unsigned short pnand_octet_t;
typedef struct {
int (*init)(void);
void (*select)(void);
void (*deselect)(void);
void (*write_command)(pnand_octet_t value);
void (*write_address)(pnand_octet_t value);
void (*write_data)(pnand_octet_t value);
pnand_octet_t (*read_data)(void);
int (*is_ready)(void);
void (*set_write_protect)(int enabled);
void (*delay_us)(unsigned long us);
} parallel_nand_port_t;
#ifdef __cplusplus
}
#endif
#endif