![]() |
LibDriver MB85RSXX
|
mb85rsxx base driver modules More...
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 | |
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 | |
mb85rsxx base driver modules
| #define MB85RSXX_USE_DEVICE_ID 1 |
mb85rsxx use device id definition
some types of chip can't use device id function and set this definition to 0 to skip device id checking. default setting is enable
Definition at line 63 of file driver_mb85rsxx.h.
| typedef struct mb85rsxx_handle_s mb85rsxx_handle_t |
mb85rsxx handle structure definition
| typedef struct mb85rsxx_info_s mb85rsxx_info_t |
mb85rsxx information structure definition
| enum mb85rsxx_status_t |
mb85rsxx status enumeration definition
| Enumerator | |
|---|---|
| MB85RSXX_STATUS_WPEN | status register write protect |
| MB85RSXX_STATUS_BP1 | block protect 1 |
| MB85RSXX_STATUS_BP0 | block protect 0 |
| MB85RSXX_STATUS_WEL | write enable latch |
Definition at line 86 of file driver_mb85rsxx.h.
| enum mb85rsxx_t |
mb85rsxx type enumeration definition
| Enumerator | |
|---|---|
| MB85RS16 | MB85RS16 type |
| MB85RS64 | MB85RS64 type |
| MB85RS128 | MB85RS128 type |
| MB85RS256 | MB85RS256 type |
| MB85RS512 | MB85RS512 type |
| MB85RS1M | MB85RS1M type |
| MB85RS2M | MB85RS2M type |
| MB85RS4M | MB85RS4M type |
Definition at line 71 of file driver_mb85rsxx.h.
| uint8_t mb85rsxx_deinit | ( | mb85rsxx_handle_t * | handle | ) |
close the chip
| [in] | *handle | pointer to a mb85rsxx handle structure |
Definition at line 333 of file driver_mb85rsxx.c.
| uint8_t mb85rsxx_disable_write | ( | mb85rsxx_handle_t * | handle | ) |
disable write
| [in] | *handle | pointer to a mb85rsxx handle structure |
Definition at line 108 of file driver_mb85rsxx.c.
| uint8_t mb85rsxx_enable_write | ( | mb85rsxx_handle_t * | handle | ) |
enable write
| [in] | *handle | pointer to a mb85rsxx handle structure |
Definition at line 72 of file driver_mb85rsxx.c.
| 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
| [in] | *handle | pointer to a mb85rsxx handle structure |
| [out] | *manufacturer_id | pointer to a manufacturer id buffer |
| [out] | *continuation_code | pointer to a continuation code buffer |
| [out] | *product_id1 | pointer to a product id1 buffer |
| [out] | *product_id2 | pointer to a product id2 buffer |
Definition at line 568 of file driver_mb85rsxx.c.
| uint8_t mb85rsxx_get_status | ( | mb85rsxx_handle_t * | handle, |
| uint8_t * | status ) |
get status
| [in] | *handle | pointer to a mb85rsxx handle structure |
| [out] | *status | pointer to a status buffer |
Definition at line 145 of file driver_mb85rsxx.c.
| uint8_t mb85rsxx_get_type | ( | mb85rsxx_handle_t * | handle, |
| mb85rsxx_t * | type ) |
get the chip type
| [in] | *handle | pointer to a mb85rsxx handle structure |
| [out] | *type | pointer to a chip type buffer |
Definition at line 385 of file driver_mb85rsxx.c.
| uint8_t mb85rsxx_info | ( | mb85rsxx_info_t * | info | ) |
get chip's information
| [out] | *info | pointer to a mb85rsxx info structure |
Definition at line 623 of file driver_mb85rsxx.c.
| uint8_t mb85rsxx_init | ( | mb85rsxx_handle_t * | handle | ) |
initialize the chip
| [in] | *handle | pointer to a mb85rsxx handle structure |
Definition at line 238 of file driver_mb85rsxx.c.
| uint8_t mb85rsxx_read | ( | mb85rsxx_handle_t * | handle, |
| uint32_t | address, | ||
| uint8_t * | buf, | ||
| uint16_t | len ) |
read bytes from the chip
| [in] | *handle | pointer to a mb85rsxx handle structure |
| [in] | address | register address |
| [out] | *buf | pointer to a data buffer |
| [in] | len | buffer length |
Definition at line 411 of file driver_mb85rsxx.c.
| uint8_t mb85rsxx_set_status | ( | mb85rsxx_handle_t * | handle, |
| uint8_t | status ) |
set status
| [in] | *handle | pointer to a mb85rsxx handle structure |
| [in] | status | set status |
Definition at line 182 of file driver_mb85rsxx.c.
| uint8_t mb85rsxx_set_type | ( | mb85rsxx_handle_t * | handle, |
| mb85rsxx_t | type ) |
set the chip type
| [in] | *handle | pointer to a mb85rsxx handle structure |
| [in] | type | chip type |
Definition at line 364 of file driver_mb85rsxx.c.
| uint8_t mb85rsxx_write | ( | mb85rsxx_handle_t * | handle, |
| uint32_t | address, | ||
| uint8_t * | buf, | ||
| uint16_t | len ) |
write bytes to the chip
| [in] | *handle | pointer to a mb85rsxx handle structure |
| [in] | address | register address |
| [in] | *buf | pointer to a data buffer |
| [in] | len | buffer length |
Definition at line 477 of file driver_mb85rsxx.c.