LibDriver MB85RCXX
Loading...
Searching...
No Matches
mb85rcxx base driver function

mb85rcxx base driver modules More...

Collaboration diagram for mb85rcxx base driver function:

Data Structures

struct  mb85rcxx_handle_s
 mb85rcxx handle structure definition More...
struct  mb85rcxx_info_s
 mb85rcxx information structure definition More...

Typedefs

typedef struct mb85rcxx_handle_s mb85rcxx_handle_t
 mb85rcxx handle structure definition
typedef struct mb85rcxx_info_s mb85rcxx_info_t
 mb85rcxx information structure definition

Enumerations

enum  mb85rcxx_t {
  MB85RC04 = 512 , MB85RC16 = 2048 , MB85RC64 = 8192 , MB85RC128 = 16384 ,
  MB85RC256 = 32768 , MB85RC512 = 65536 , MB85RC1M = 131072
}
 mb85rcxx type enumeration definition More...
enum  mb85rcxx_address_t {
  MB85RCXX_ADDRESS_A000 = 0 , MB85RCXX_ADDRESS_A001 = 1 , MB85RCXX_ADDRESS_A010 = 2 , MB85RCXX_ADDRESS_A011 = 3 ,
  MB85RCXX_ADDRESS_A100 = 4 , MB85RCXX_ADDRESS_A101 = 5 , MB85RCXX_ADDRESS_A110 = 6 , MB85RCXX_ADDRESS_A111 = 7
}
 mb85rcxx address enumeration definition More...

Functions

uint8_t mb85rcxx_info (mb85rcxx_info_t *info)
 get chip's information
uint8_t mb85rcxx_init (mb85rcxx_handle_t *handle)
 initialize the chip
uint8_t mb85rcxx_deinit (mb85rcxx_handle_t *handle)
 close the chip
uint8_t mb85rcxx_set_type (mb85rcxx_handle_t *handle, mb85rcxx_t type)
 set the chip type
uint8_t mb85rcxx_get_type (mb85rcxx_handle_t *handle, mb85rcxx_t *type)
 get the chip type
uint8_t mb85rcxx_set_addr_pin (mb85rcxx_handle_t *handle, mb85rcxx_address_t addr_pin)
 set the chip address pin
uint8_t mb85rcxx_get_addr_pin (mb85rcxx_handle_t *handle, mb85rcxx_address_t *addr_pin)
 get the chip address pin
uint8_t mb85rcxx_read (mb85rcxx_handle_t *handle, uint32_t address, uint8_t *buf, uint16_t len)
 read bytes from the chip
uint8_t mb85rcxx_write (mb85rcxx_handle_t *handle, uint32_t address, uint8_t *buf, uint16_t len)
 write bytes to the chip

Detailed Description

mb85rcxx base driver modules

Typedef Documentation

◆ mb85rcxx_handle_t

mb85rcxx handle structure definition

◆ mb85rcxx_info_t

mb85rcxx information structure definition

Enumeration Type Documentation

◆ mb85rcxx_address_t

mb85rcxx address enumeration definition

Enumerator
MB85RCXX_ADDRESS_A000 

A2A1A0 000

MB85RCXX_ADDRESS_A001 

A2A1A0 001

MB85RCXX_ADDRESS_A010 

A2A1A0 010

MB85RCXX_ADDRESS_A011 

A2A1A0 011

MB85RCXX_ADDRESS_A100 

A2A1A0 100

MB85RCXX_ADDRESS_A101 

A2A1A0 101

MB85RCXX_ADDRESS_A110 

A2A1A0 110

MB85RCXX_ADDRESS_A111 

A2A1A0 111

Definition at line 76 of file driver_mb85rcxx.h.

◆ mb85rcxx_t

enum mb85rcxx_t

mb85rcxx type enumeration definition

Enumerator
MB85RC04 

MB85RC04 type

MB85RC16 

MB85RC16 type

MB85RC64 

MB85RC64 type

MB85RC128 

MB85RC128 type

MB85RC256 

MB85RC256 type

MB85RC512 

MB85RC512 type

MB85RC1M 

MB85RC1M type

Definition at line 62 of file driver_mb85rcxx.h.

Function Documentation

◆ mb85rcxx_deinit()

uint8_t mb85rcxx_deinit ( mb85rcxx_handle_t * handle)

close the chip

Parameters
[in]*handlepointer to a mb85rcxx handle structure
Returns
status code
  • 0 success
  • 1 iic deinit failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 135 of file driver_mb85rcxx.c.

◆ mb85rcxx_get_addr_pin()

uint8_t mb85rcxx_get_addr_pin ( mb85rcxx_handle_t * handle,
mb85rcxx_address_t * addr_pin )

get the chip address pin

Parameters
[in]*handlepointer to a mb85rcxx handle structure
[out]*addr_pinpointer to a chip address pin
Returns
status code
  • 0 success
  • 2 handle is NULL
Note
none

Definition at line 230 of file driver_mb85rcxx.c.

◆ mb85rcxx_get_type()

uint8_t mb85rcxx_get_type ( mb85rcxx_handle_t * handle,
mb85rcxx_t * type )

get the chip type

Parameters
[in]*handlepointer to a mb85rcxx handle structure
[out]*typepointer to a chip type buffer
Returns
status code
  • 0 success
  • 2 handle is NULL
Note
none

Definition at line 187 of file driver_mb85rcxx.c.

◆ mb85rcxx_info()

uint8_t mb85rcxx_info ( mb85rcxx_info_t * info)

get chip's information

Parameters
[out]*infopointer to a mb85rcxx info structure
Returns
status code
  • 0 success
  • 2 handle is NULL
Note
none

Definition at line 460 of file driver_mb85rcxx.c.

◆ mb85rcxx_init()

uint8_t mb85rcxx_init ( mb85rcxx_handle_t * handle)

initialize the chip

Parameters
[in]*handlepointer to a mb85rcxx handle structure
Returns
status code
  • 0 success
  • 1 iic initialization failed
  • 2 handle is NULL
  • 3 linked functions is NULL
Note
none

Definition at line 61 of file driver_mb85rcxx.c.

◆ mb85rcxx_read()

uint8_t mb85rcxx_read ( mb85rcxx_handle_t * handle,
uint32_t address,
uint8_t * buf,
uint16_t len )

read bytes from the chip

Parameters
[in]*handlepointer to a mb85rcxx handle structure
[in]addressregister address
[out]*bufpointer to a data buffer
[in]lenbuffer length
Returns
status code
  • 0 success
  • 1 read data failed
  • 2 handle is NULL
  • 3 handle is not initialized
  • 4 end address is over the max address
Note
none

Definition at line 256 of file driver_mb85rcxx.c.

◆ mb85rcxx_set_addr_pin()

uint8_t mb85rcxx_set_addr_pin ( mb85rcxx_handle_t * handle,
mb85rcxx_address_t addr_pin )

set the chip address pin

Parameters
[in]*handlepointer to a mb85rcxx handle structure
[in]addr_pinchip address pin
Returns
status code
  • 0 success
  • 2 handle is NULL
Note
none

Definition at line 208 of file driver_mb85rcxx.c.

◆ mb85rcxx_set_type()

uint8_t mb85rcxx_set_type ( mb85rcxx_handle_t * handle,
mb85rcxx_t type )

set the chip type

Parameters
[in]*handlepointer to a mb85rcxx handle structure
[in]typechip type
Returns
status code
  • 0 success
  • 2 handle is NULL
Note
none

Definition at line 166 of file driver_mb85rcxx.c.

◆ mb85rcxx_write()

uint8_t mb85rcxx_write ( mb85rcxx_handle_t * handle,
uint32_t address,
uint8_t * buf,
uint16_t len )

write bytes to the chip

Parameters
[in]*handlepointer to a mb85rcxx handle structure
[in]addressregister address
[in]*bufpointer to a data buffer
[in]lenbuffer length
Returns
status code
  • 0 success
  • 1 write data failed
  • 2 handle is NULL
  • 3 handle is not initialized
  • 4 end address is over the max address
Note
none

Definition at line 361 of file driver_mb85rcxx.c.