excelonultra 2.0.0.0
excelonultra.h File Reference

This file contains API for Excelon-Ultra Click Driver. More...

#include "drv_digital_out.h"
#include "drv_digital_in.h"
#include "drv_spi_master.h"

Go to the source code of this file.

Data Structures

struct  excelonultra_t
 Excelon-Ultra Click context object. More...
 
struct  excelonultra_cfg_t
 Excelon-Ultra Click configuration object. More...
 

Macros

#define EXCELONULTRA_CMD_WREN   0x06/*< Write Enable*/
 Excelon-Ultra Write Enable Control commands.
 
#define EXCELONULTRA_CMD_WRDI   0x04/*< Write Disable*/
 
#define EXCELONULTRA_CMD_WRSR   0x01/*< Write Status Register 1*/
 Excelon-Ultra Register Access commands.
 
#define EXCELONULTRA_CMD_RDSR1   0x05/*< Read Status Register 1*/
 
#define EXCELONULTRA_CMD_RDSR2   0x07/*< Read Status Register 2*/
 
#define EXCELONULTRA_CMD_RDCR1   0x32/*< Read Status Configuration Register 1*/
 
#define EXCELONULTRA_CMD_RDCR2   0x3F/*< Read Status Configuration Register 2*/
 
#define EXCELONULTRA_CMD_RDCR4   0x45/*< Read Status Configuration Register 4*/
 
#define EXCELONULTRA_CMD_RDCR5   0x5E/*< Read Status Configuration Register 5*/
 
#define EXCELONULTRA_CMD_WRAR   0x71/*< Write Any Register*/
 
#define EXCELONULTRA_CMD_RDAR   0x65/*< Rrite Any Register*/
 
#define EXCELONULTRA_CMD_READ   0x03/*< Memory Read*/
 Excelon-Ultra Memory control commands.
 
#define EXCELONULTRA_CMD_FAST_READ   0x0B/*< Memory Fast Read*/
 
#define EXCELONULTRA_CMD_WRITE   0x02/*< Memory Write*/
 
#define EXCELONULTRA_CMD_FAST_WRITE   0xDA/*< Memory Fast Write*/
 
#define EXCELONULTRA_CMD_SSWR   0x42/*< Special Sector Write*/
 
#define EXCELONULTRA_CMD_SSRD   0x4B/*< Special Sector Read*/
 
#define EXCELONULTRA_CMD_CLECC   0x1B/*< Clear ECC Register*/
 Excelon-Ultra ECC and CRC commands.
 
#define EXCELONULTRA_CMD_ECCRD   0x19/*< ECC Status Read*/
 
#define EXCELONULTRA_CMD_CRCC   0x5B/*< CRC Calculation*/
 
#define EXCELONULTRA_CMD_EPCS   0x75/*< CRC Suspend*/
 
#define EXCELONULTRA_CMD_EPCR   0x7A/*< CRC Resume*/
 
#define EXCELONULTRA_CMD_RUID   0x4C/*< Read Unique ID*/
 Excelon-Ultra Identication commands.
 
#define EXCELONULTRA_CMD_RDID   0x9F/*< Read Device ID*/
 
#define EXCELONULTRA_CMD_WRSN   0xC2/*< Write Serial Number*/
 
#define EXCELONULTRA_CMD_RDSN   0xC3/*< Read Serial Number*/
 
#define EXCELONULTRA_CMD_DPD   0xB9/*< Deep Power Down*/
 Excelon-Ultra Power and reset commands.
 
#define EXCELONULTRA_CMD_HBN   0xBA/*< Hibernate Mode*/
 
#define EXCELONULTRA_CMD_RSTEN   0x66/*< Reset Enable*/
 
#define EXCELONULTRA_CMD_RST   0x99/*< Software Reset*/
 
#define EXCELONULTRA_MAX_MEMORY_ADDRESS   0x1FFFFF
 Excelon-Ultra description setting.
 
#define EXCELONULTRA_MAP_MIKROBUS(cfg, mikrobus)
 MikroBUS pin mapping.
 

Enumerations

enum  excelonultra_return_value_t { EXCELONULTRA_OK = 0 , EXCELONULTRA_ERROR = -1 }
 Excelon-Ultra Click return value data. More...
 

Functions

void excelonultra_cfg_setup (excelonultra_cfg_t *cfg)
 Excelon-Ultra configuration object setup function.
 
err_t excelonultra_init (excelonultra_t *ctx, excelonultra_cfg_t *cfg)
 Excelon-Ultra initialization function.
 
err_t excelonultra_default_cfg (excelonultra_t *ctx)
 Excelon-Ultra default configuration function.
 
err_t excelonultra_send_cmd (excelonultra_t *ctx, uint8_t cmd)
 Send command.
 
err_t excelonultra_generic_transfer (excelonultra_t *ctx, uint8_t *data_in, uint32_t len_in, uint8_t *data_out, uint32_t len_out)
 Write-Read function.
 
err_t excelonultra_generic_write (excelonultra_t *ctx, uint8_t *data_in, uint32_t len_in)
 Excelon-Ultra data writing function.
 
err_t excelonultra_get_device_identification (excelonultra_t *ctx)
 Get device IDs.
 
err_t excelonultra_write_byte_to_memory (excelonultra_t *ctx, uint32_t mem_adr, uint8_t mem_data)
 Write byte of data to specified memory address.
 
err_t excelonultra_write_data_to_memory (excelonultra_t *ctx, uint32_t mem_adr, uint8_t *mem_data, uint32_t mem_data_len)
 Write data starting from specified memory address.
 
err_t excelonultra_read_byte_from_memory (excelonultra_t *ctx, uint32_t mem_adr, uint8_t *mem_data)
 Read byte of data from specified memory address.
 
err_t excelonultra_read_data_from_memory (excelonultra_t *ctx, uint32_t mem_adr, uint8_t *mem_data, uint32_t mem_data_len)
 Read data starting from specified memory address.
 
err_t excelonultra_clear_byte_from_memory (excelonultra_t *ctx, uint32_t mem_adr)
 Clear byte of data from specified memory address.
 
err_t excelonultra_clear_data_from_memory (excelonultra_t *ctx, uint32_t mem_adr, uint32_t mem_data_len)
 Clears data starting from specified memory address.
 
void excelonultra_set_rst_pin (excelonultra_t *ctx, uint8_t state)
 Set reset pin state.
 
void excelonultra_set_wp_pin (excelonultra_t *ctx, uint8_t state)
 Set write protect pin state.
 
void excelonultra_hw_reset (excelonultra_t *ctx)
 Reset device.
 

Detailed Description

This file contains API for Excelon-Ultra Click Driver.

Enumeration Type Documentation

◆ excelonultra_return_value_t

Excelon-Ultra Click return value data.

Predefined enum values for driver return values.

Enumerator
EXCELONULTRA_OK 
EXCELONULTRA_ERROR