LibDriver MB85RSXX
Loading...
Searching...
No Matches
driver_mb85rsxx.h File Reference

driver mb85rsxx header file More...

#include <stdio.h>
#include <stdint.h>
#include <string.h>
Include dependency graph for driver_mb85rsxx.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  mb85rsxx_handle_s
 mb85rsxx handle structure definition More...
struct  mb85rsxx_info_s
 mb85rsxx information structure definition More...

Macros

#define MB85RSXX_USE_DEVICE_ID   1
 mb85rsxx use device id definition
#define DRIVER_MB85RSXX_LINK_INIT(HANDLE, STRUCTURE)
 initialize mb85rsxx_handle_t structure
#define DRIVER_MB85RSXX_LINK_SPI_INIT(HANDLE, FUC)
 link spi_init function
#define DRIVER_MB85RSXX_LINK_SPI_DEINIT(HANDLE, FUC)
 link spi_deinit function
#define DRIVER_MB85RSXX_LINK_SPI_READ_WRITE(HANDLE, FUC)
 link spi_read_write function
#define DRIVER_MB85RSXX_LINK_DELAY_MS(HANDLE, FUC)
 link delay_ms function
#define DRIVER_MB85RSXX_LINK_DEBUG_PRINT(HANDLE, FUC)
 link debug_print function

Typedefs

typedef struct mb85rsxx_handle_s mb85rsxx_handle_t
 mb85rsxx handle structure definition
typedef struct mb85rsxx_info_s mb85rsxx_info_t
 mb85rsxx information structure definition

Enumerations

enum  mb85rsxx_t {
  MB85RS16 = 2048 , MB85RS64 = 8192 , MB85RS128 = 16384 , MB85RS256 = 32768 ,
  MB85RS512 = 65536 , MB85RS1M = 131072 , MB85RS2M = 262144 , MB85RS4M = 524288
}
 mb85rsxx type enumeration definition More...
enum  mb85rsxx_status_t { MB85RSXX_STATUS_WPEN = (1 << 7) , MB85RSXX_STATUS_BP1 = (1 << 3) , MB85RSXX_STATUS_BP0 = (1 << 2) , MB85RSXX_STATUS_WEL = (1 << 1) }
 mb85rsxx status enumeration definition More...

Functions

uint8_t mb85rsxx_info (mb85rsxx_info_t *info)
 get chip's information
uint8_t mb85rsxx_init (mb85rsxx_handle_t *handle)
 initialize the chip
uint8_t mb85rsxx_deinit (mb85rsxx_handle_t *handle)
 close the chip
uint8_t mb85rsxx_set_type (mb85rsxx_handle_t *handle, mb85rsxx_t type)
 set the chip type
uint8_t mb85rsxx_get_type (mb85rsxx_handle_t *handle, mb85rsxx_t *type)
 get the chip type
uint8_t mb85rsxx_read (mb85rsxx_handle_t *handle, uint32_t address, uint8_t *buf, uint16_t len)
 read bytes from the chip
uint8_t mb85rsxx_write (mb85rsxx_handle_t *handle, uint32_t address, uint8_t *buf, uint16_t len)
 write bytes to the chip
uint8_t mb85rsxx_enable_write (mb85rsxx_handle_t *handle)
 enable write
uint8_t mb85rsxx_disable_write (mb85rsxx_handle_t *handle)
 disable write
uint8_t mb85rsxx_set_status (mb85rsxx_handle_t *handle, uint8_t status)
 set status
uint8_t mb85rsxx_get_status (mb85rsxx_handle_t *handle, uint8_t *status)
 get status
uint8_t mb85rsxx_get_device_id (mb85rsxx_handle_t *handle, uint8_t *manufacturer_id, uint8_t *continuation_code, uint8_t *product_id1, uint8_t *product_id2)
 get device id

Detailed Description

driver mb85rsxx header file

Copyright (c) 2015 - present LibDriver All rights reserved

The MIT License (MIT)

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Version
1.0.0
Author
Shifeng Li
Date
2025-10-15

history

Date Version Author Description
2025/10/15 1.0 Shifeng Li first upload

Definition in file driver_mb85rsxx.h.