36 lines
1.0 KiB
C
36 lines
1.0 KiB
C
|
///Copyright (c) 2022, <20>Ĵ<EFBFBD><C4B4><EFBFBD>Դ<EFBFBD><D4B4>ͨ<EFBFBD><CDA8><EFBFBD><EFBFBD><EFBFBD><EFBFBD>˾
|
|||
|
///All rights reserved.
|
|||
|
///@file mb85rc64.h
|
|||
|
///@brief mb85rc64<36><34><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
///
|
|||
|
///@details
|
|||
|
///@note
|
|||
|
///@author lqc
|
|||
|
///@date 2022/05/26
|
|||
|
///
|
|||
|
///@version v1.0 2022/05/26 <20><>ʼ<EFBFBD>汾
|
|||
|
|
|||
|
#ifndef __MB85RC64_H_
|
|||
|
#define __MB85RC64_H_
|
|||
|
|
|||
|
#include "gd32f4xx_gpio.h"
|
|||
|
|
|||
|
#define MB85RC64_ADDRESS_WRITE 0xA0
|
|||
|
#define MB85RC64_ADDRESS_READ 0xA1
|
|||
|
|
|||
|
#define MB85RC64_SCL_HIGH gpio_bit_set(GPIOB, GPIO_PIN_6)
|
|||
|
#define MB85RC64_SCL_LOW gpio_bit_reset(GPIOB, GPIO_PIN_6)
|
|||
|
|
|||
|
#define MB85RC64_SDA_HIGH gpio_bit_set(GPIOB, GPIO_PIN_7)
|
|||
|
#define MB85RC64_SDA_LOW gpio_bit_reset(GPIOB, GPIO_PIN_7)
|
|||
|
#define MB85RC64_SDA_GET gpio_input_bit_get(GPIOB, GPIO_PIN_7)
|
|||
|
|
|||
|
//mb85rc64<36>洢<EFBFBD><E6B4A2>ַ
|
|||
|
#define MB85RC64_SAVE_ADDRESS_BEGIN 0x0000
|
|||
|
|
|||
|
void mb85rc64_gpio_init();
|
|||
|
char mb85rc64_page_write(unsigned short int addr, unsigned char* data, int data_len);
|
|||
|
char mb85rc64_add_read(unsigned short int addr, unsigned char *data, int data_len);
|
|||
|
void mb85rc64_function_test();
|
|||
|
void read_mb_id(uint8_t* buff);
|
|||
|
#endif
|