recnplay 2.0.0.0
recnplay.h File Reference

This file contains API for Rec & Play Click 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  recnplay_t
 Click ctx object definition. More...
 
struct  recnplay_dev_id_t
 Device ID data. More...
 
struct  recnplay_cfg_t
 Click configuration structure definition. More...
 

Macros

#define RECNPLAY_MAP_MIKROBUS(cfg, mikrobus)
 
#define RECPLAY_PLAY_VP   0xA6
 
#define RECPLAY_PLAY_VP_RN   0xAE
 
#define RECPLAY_EXE_VM   0xB0
 
#define RECPLAY_REC_MSG   0x38
 
#define RECPLAY_REC_MSG_ADDR   0x3A
 
#define RECPLAY_PLAY_MSG   0x3C
 
#define RECPLAY_PLAY_SIL   0xA8
 
#define RECPLAY_STOP   0x2A
 
#define RECPLAY_ERASE_MSG   0x3E
 
#define RECPLAY_SPI_PCM_WRITE   0xAA
 
#define RECPLAY_SPI_PCM_READ   0xAC
 
#define RECPLAY_SPI_SND_DEC   0xC0
 
#define RECPLAY_SPI_RCV_ENC   0xC2
 
#define RECPLAY_READ_STATUS   0x40
 
#define RECPLAY_READ_INT   0x46
 
#define RECPLAY_READ_MSG_ADDR   0x42
 
#define RECPLAY_READ_MSG_LEN   0x44
 
#define RECPLAY_READ_ID   0x48
 
#define RECPLAY_DIG_READ   0xA2
 
#define RECPLAY_DIG_WRITE   0xA0
 
#define RECPLAY_ERASE_MEM   0x24
 
#define RECPLAY_CHIP_ERASE   0x26
 
#define RECPLAY_PWR_UP   0x10
 
#define RECPLAY_PWR_DOWN   0x12
 
#define RECPLAY_SET_CLK_CFG   0xB4
 
#define RECPLAY_READ_CLK_CFG   0xB6
 
#define RECPLAY_WRITE_CFG_REG   0xB8
 
#define RECPLAY_READ_CFG_REG   0xBA
 
#define RECPLAY_INT_PEAK_DET_MASK   0x80
 
#define RECPLAY_INT_MEM_PROT_ERR_MASK   0x40
 
#define RECPLAY_INT_WR_FIN_MASK   0x20
 
#define RECPLAY_INT_CMD_ERR_MASK   0x10
 
#define RECPLAY_INT_OVF_ERR_MASK   0x08
 
#define RECPLAY_INT_CMD_FIN_MASK   0x04
 
#define RECPLAY_INT_ADDR_ERR_MASK   0x02
 
#define RECPLAY_INT_FULL_ERR_MASK   0x01
 
#define RECPLAY_STAT_PWR_DOWN_MASK   0x80
 
#define RECPLAY_STAT_DBUF_RDY_MASK   0x40
 
#define RECPLAY_STAT_INT_GEN_MASK   0x20
 
#define RECPLAY_STAT_REC_MEM_FULL_MASK   0x10
 
#define RECPLAY_STAT_VM_BSY_MASK   0x04
 
#define RECPLAY_STAT_CBUF_FULL_MASK   0x02
 
#define RECPLAY_STAT_CMD_BSY_MASK   0x01
 
#define RECPLAY_INT_GEN_PIN   0x00
 
#define RECPLAY_INT_NO_GEN_PIN   0x01
 
#define RECPLAY_SPI_RDY_PIN   0x01
 
#define RECPLAY_SPI_BSY_PIN   0x00
 
#define RECPLAY_CFG00_REG   0x00
 
#define RECPLAY_CFG01_REG   0x01
 
#define RECPLAY_CFG02_REG   0x02
 
#define RECPLAY_CFG03_REG   0x03
 
#define RECPLAY_CFG04_REG   0x04
 
#define RECPLAY_CFG05_REG   0x05
 
#define RECPLAY_CFG06_REG   0x06
 
#define RECPLAY_CFG07_REG   0x07
 
#define RECPLAY_CFG08_REG   0x08
 
#define RECPLAY_CFG09_REG   0x09
 
#define RECPLAY_CFG0A_REG   0x0A
 
#define RECPLAY_CFG0B_REG   0x0B
 
#define RECPLAY_CFG0C_REG   0x0C
 
#define RECPLAY_CFG0D_REG   0x0D
 
#define RECPLAY_CFG0E_REG   0x0E
 
#define RECPLAY_CFG0F_REG   0x0F
 
#define RECPLAY_CFG10_REG   0x10
 
#define RECPLAY_CFG11_REG   0x11
 
#define RECPLAY_CFG12_REG   0x12
 
#define RECPLAY_CFG13_REG   0x13
 
#define RECPLAY_CFG14_REG   0x14
 
#define RECPLAY_CFG15_REG   0x15
 
#define RECPLAY_CFG16_REG   0x16
 
#define RECPLAY_CFG17_REG   0x17
 
#define RECPLAY_CFG18_REG   0x18
 
#define RECPLAY_CFG19_REG   0x19
 
#define RECPLAY_CFG1A_REG   0x1A
 
#define RECPLAY_CFG1B_REG   0x1B
 
#define RECPLAY_CFG1C_REG   0x1C
 
#define RECPLAY_CFG1D_REG   0x1D
 
#define RECPLAY_CFG1E_REG   0x1E
 
#define RECPLAY_CFG1F_REG   0x1F
 
#define RECPLAY_CFG20_REG   0x20
 
#define RECPLAY_CFG21_REG   0x21
 
#define RECPLAY_CFG22_REG   0x22
 
#define RECPLAY_CFG23_REG   0x23
 
#define RECPLAY_CFG24_REG   0x24
 
#define RECPLAY_CFG25_REG   0x25
 
#define RECPLAY_CFG26_REG   0x26
 
#define RECPLAY_CFG27_REG   0x27
 
#define RECPLAY_CFG28_REG   0x28
 
#define RECPLAY_CFG29_REG   0x29
 
#define RECPLAY_CFG2A_REG   0x2A
 
#define RECPLAY_CFG2B_REG   0x2B
 
#define RECPLAY_CFG2C_REG   0x2C
 
#define RECPLAY_CFG2D_REG   0x2D
 
#define RECPLAY_CFG2E_REG   0x2E
 
#define RECPLAY_CFG2F_REG   0x2F
 
#define RECNPLAY_RETVAL   uint8_t
 
#define RECNPLAY_OK   0x00
 
#define RECNPLAY_INIT_ERROR   0xFF
 

Functions

void recnplay_cfg_setup (recnplay_cfg_t *cfg)
 Config Object Initialization function.
 
RECNPLAY_RETVAL recnplay_init (recnplay_t *ctx, recnplay_cfg_t *cfg)
 Initialization function.
 
void recnplay_generic_transfer (recnplay_t *ctx, uint8_t *wr_buf, uint16_t wr_len, uint8_t *rd_buf, uint16_t rd_len)
 Generic transfer function.
 
RECNPLAY_RETVAL recplay_play_vp (recnplay_t *ctx, uint16_t index)
 Voice Prompt Play Command.
 
RECNPLAY_RETVAL recplay_play_vp_rn (recnplay_t *ctx, uint8_t value_rn)
 Voice Prompt @Rn Play Command.
 
RECNPLAY_RETVAL recplay_execute_vm (recnplay_t *ctx, uint16_t index)
 Voice Macro Execute Command.
 
RECNPLAY_RETVAL recplay_record_msg (recnplay_t *ctx)
 Message Record Command.
 
RECNPLAY_RETVAL recplay_record_msg_addr (recnplay_t *ctx, uint32_t mem_addr)
 Message Record at Address Command.
 
RECNPLAY_RETVAL recplay_play_msg (recnplay_t *ctx, uint32_t mem_addr, uint16_t sector_offset)
 Message Play at Address Command.
 
RECNPLAY_RETVAL recplay_play_silence (recnplay_t *ctx, uint8_t silence_length)
 Silence Play Command.
 
RECNPLAY_RETVAL recplay_stop (recnplay_t *ctx)
 Stop Command.
 
RECNPLAY_RETVAL recplay_erase_msg (recnplay_t *ctx, uint32_t mem_addr)
 Message Erase at Address Command.
 
RECNPLAY_RETVAL recplay_spi_write_pcm (recnplay_t *ctx, uint16_t *data_pcm, uint8_t num_pcm)
 PCM Data SPI Write Command.
 
RECNPLAY_RETVAL recplay_spi_read_pcm (recnplay_t *ctx, uint16_t *data_pcm, uint8_t num_pcm)
 PCM Data SPI Read Command.
 
RECNPLAY_RETVAL recplay_spi_send_cmprsd_data (recnplay_t *ctx, uint8_t *cmprsd_data, uint8_t n_data)
 SPI Send Compressed Data to Decode Command.
 
RECNPLAY_RETVAL recplay_spi_receive_enc_data (recnplay_t *ctx, uint8_t *encoded_data, uint8_t n_data)
 SPI Receive Encoded Data Command.
 
RECNPLAY_RETVAL recplay_read_status (recnplay_t *ctx, uint8_t *interr_status)
 Status Read Command.
 
RECNPLAY_RETVAL recplay_read_interr (recnplay_t *ctx, uint8_t *interr_status)
 Interrupt Read Command.
 
RECNPLAY_RETVAL recplay_read_msg_addr (recnplay_t *ctx, uint32_t *msg_addr, uint16_t *msg_length)
 Recorded Message Address Read Command.
 
RECNPLAY_RETVAL recplay_read_msg_length (recnplay_t *ctx, uint16_t *msg_length)
 Message Length Read Command.
 
RECNPLAY_RETVAL recplay_read_id (recnplay_t *ctx, recnplay_dev_id_t *dev_id_data)
 ISD3900 ID Read Command.
 
RECNPLAY_RETVAL recplay_dig_read (recnplay_t *ctx, uint32_t mem_addr, uint8_t *data_out, uint8_t n_data)
 Digital Read Command.
 
RECNPLAY_RETVAL recplay_dig_write (recnplay_t *ctx, uint32_t mem_addr, uint8_t *data_in, uint8_t n_data)
 Digital Write Command.
 
RECNPLAY_RETVAL recplay_erase_mem (recnplay_t *ctx, uint32_t start_addr, uint32_t end_addr)
 Memory Erase Command.
 
RECNPLAY_RETVAL recplay_erase_chip (recnplay_t *ctx)
 Chip Erase Command.
 
RECNPLAY_RETVAL recplay_pwr_up (recnplay_t *ctx)
 Power Up Command.
 
RECNPLAY_RETVAL recplay_pwr_down (recnplay_t *ctx)
 Power Down Command.
 
RECNPLAY_RETVAL recplay_set_clk_cnfg (recnplay_t *ctx, uint8_t clk_cnfg)
 Clock Configuration Set Command.
 
RECNPLAY_RETVAL recplay_read_clk_cnfg (recnplay_t *ctx, uint8_t *clk_cnfg)
 Clock Configuration Read Command.
 
RECNPLAY_RETVAL recplay_write_cnfg_reg (recnplay_t *ctx, uint8_t reg_addr, uint8_t *cnfg_data, uint8_t n_data)
 Configuration Write Command.
 
RECNPLAY_RETVAL recplay_read_cnfg_reg (recnplay_t *ctx, uint8_t reg_addr, uint8_t *cnfg_data, uint8_t n_data)
 Configuration Read Command.
 
uint8_t recplay_check_rdy (recnplay_t *ctx)
 SPI Data Transfer Status Check Command.
 
uint8_t recplay_check_int (recnplay_t *ctx)
 Interrupt Request Pin Check Command.
 
void recplay_reset (recnplay_t *ctx)
 ISD3900 Reset Command.
 

Detailed Description

This file contains API for Rec & Play Click Click driver.