43 lines
734 B
C
43 lines
734 B
C
#ifndef _SH50_ISP_H_
|
|
#define _SH50_ISP_H_
|
|
|
|
|
|
#include "typedef.h"
|
|
|
|
|
|
|
|
struct ssi_fd_t {
|
|
u32 chip_sfr_base;
|
|
u32 chip_bit_offset;
|
|
u8(*ssi_rx_byte)(void);
|
|
void (*ssi_tx_byte)(u8 byte);
|
|
void (*ssi_cs)(u8 cs);
|
|
void (*udelay)(u32 us);
|
|
};
|
|
|
|
u8 sh50_check_chip(const struct ssi_fd_t *fd, u32 check_times);
|
|
void sh50_chip_reset(const struct ssi_fd_t *fd);
|
|
|
|
|
|
struct isp_fd_t {
|
|
u32 chip_id;
|
|
u8 *decode_buf;
|
|
u8(*isp_rx_byte)(void);
|
|
void (*isp_tx_byte)(u8 byte);
|
|
void (*isp_dma_tx)(u8 *buf, u32 len);
|
|
void (*isp_set_clk)(u32 freq);
|
|
void (*isp_clk_out)(void);
|
|
void (*udelay)(u32 us);
|
|
};
|
|
|
|
int isp_push_code(const struct isp_fd_t *fd, u8 *buf, u32 len);
|
|
|
|
void sh50_isp_up_code(void);
|
|
|
|
|
|
|
|
|
|
|
|
#endif
|
|
|