recnplay 2.0.0.0
|
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. | |
void recnplay_cfg_setup | ( | recnplay_cfg_t * | cfg | ) |
Config Object Initialization function.
cfg | Click configuration structure. |
@description This function initializes click configuration structure to init state.
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.
ctx | Click object. |
wr_buf | Write data buffer |
wr_len | Number of byte in write data buffer |
rd_buf | Read data buffer |
rd_len | Number of byte in read data buffer |
@description Generic SPI transfer, for sending and receiving packages
RECNPLAY_RETVAL recnplay_init | ( | recnplay_t * | ctx, |
recnplay_cfg_t * | cfg ) |
Initialization function.
ctx | Click object. |
cfg | Click configuration structure. |
@description This function initializes all necessary pins and peripherals used for this click.
uint8_t recplay_check_int | ( | recnplay_t * | ctx | ) |
Interrupt Request Pin Check Command.
ctx | Click object. |
@description Function reports the status of the INT pin, does interrupt generated or not.
uint8_t recplay_check_rdy | ( | recnplay_t * | ctx | ) |
SPI Data Transfer Status Check Command.
ctx | Click object. |
@description Function reports the status of data transfer on the SPI interface.
RECNPLAY_RETVAL recplay_dig_read | ( | recnplay_t * | ctx, |
uint32_t | mem_addr, | ||
uint8_t * | data_out, | ||
uint8_t | n_data ) |
Digital Read Command.
ctx | Click object. |
mem_addr | Memory address |
data_out | Memory where data be stored |
n_data | Number of data bytes to be read |
@description Function initiates a read of flash memory from specified address. Interrupt Generation: ADDR_ERR if memory protected or RDY/BSYB violated, OVF_ERR if read past end of array.
RECNPLAY_RETVAL recplay_dig_write | ( | recnplay_t * | ctx, |
uint32_t | mem_addr, | ||
uint8_t * | data_in, | ||
uint8_t | n_data ) |
Digital Write Command.
ctx | Click object. |
mem_addr | Memory address |
data_in | Data to be written |
n_data | Number of data bytes to be written |
@description Function initiates a write to flash memory from specified address. Interrupt Generation: ADDR_ERR if memory protected or RDY/BSYB violated, OVF_ERR if write past end of array.
RECNPLAY_RETVAL recplay_erase_chip | ( | recnplay_t * | ctx | ) |
Chip Erase Command.
ctx | Click object. |
@description Function erases the entire contents of the external memory. Interrupt Generation: CMD_ERR if device is busy and cannot accept command, CMD_FIN when erase operation complete.
RECNPLAY_RETVAL recplay_erase_mem | ( | recnplay_t * | ctx, |
uint32_t | start_addr, | ||
uint32_t | end_addr ) |
Memory Erase Command.
ctx | Click object. |
start_addr | Start address |
end_addr | End address |
@description Function erases memory from sector containing Start address to sector containing End address. Interrupt Generation: ADDR_ERR if memory protected, CMD_ERR if device is busy, CMD_FIN when erase operation complete.
RECNPLAY_RETVAL recplay_erase_msg | ( | recnplay_t * | ctx, |
uint32_t | mem_addr ) |
Message Erase at Address Command.
ctx | Click object. |
mem_addr | Memory location |
@description Function erases the message starting at the specified address. Interrupt Generation: CMD_ERR if not accepted, CMD_FIN when erase complete, ADDR_ERR if invalid address sent.
RECNPLAY_RETVAL recplay_execute_vm | ( | recnplay_t * | ctx, |
uint16_t | index ) |
Voice Macro Execute Command.
ctx | Click object. |
index | Index of Voice Macro |
@description Function initiates the execution of a pre-recorded voice group. Interrupt Generation: CMD_ERR if not accepted, CMD_FIN when playback is finished.
RECNPLAY_RETVAL recplay_play_msg | ( | recnplay_t * | ctx, |
uint32_t | mem_addr, | ||
uint16_t | sector_offset ) |
Message Play at Address Command.
ctx | Click object. |
mem_addr | Memory location |
sector_offset | Sector offset |
@description Function initiates a play of a recorded message starting at a specified address, with a specified sector offset. Interrupt Generation: CMD_ERR if not accepted, CMD_FIN when playback complete, ADDR_ERR if invalid address sent.
RECNPLAY_RETVAL recplay_play_silence | ( | recnplay_t * | ctx, |
uint8_t | silence_length ) |
Silence Play Command.
ctx | Click object. |
silence_length | Silence length * 32ms |
@description Function plays a period of silence to the signal path. Interrupt Generation: CMD_ERR if not accepted, CMD_FIN when silence playback complete.
RECNPLAY_RETVAL recplay_play_vp | ( | recnplay_t * | ctx, |
uint16_t | index ) |
Voice Prompt Play Command.
ctx | Click object. |
index | Index of Voice Prompt |
@description Function initiates a play of a pre-recorded voice prompt.
RECNPLAY_RETVAL recplay_play_vp_rn | ( | recnplay_t * | ctx, |
uint8_t | value_rn ) |
Voice Prompt @Rn Play Command.
ctx | Click object. |
value_rn | R(n) selection from 0 to 7 |
@description Function initiates a play of a pre-recorded voice prompt, but 16bit index is stored in Rn. The 16 bit value of Rn, user can find in Configuration registers from CFG20 to CFG2F. Interrupt Generation: CMD_ERR if not accepted, CMD_FIN when playback is finished.
RECNPLAY_RETVAL recplay_pwr_down | ( | recnplay_t * | ctx | ) |
Power Down Command.
ctx | Click object. |
@description Function powers down the device. Interrupt Generation: This command does not generate interrupt.
RECNPLAY_RETVAL recplay_pwr_up | ( | recnplay_t * | ctx | ) |
Power Up Command.
ctx | Click object. |
@description Function powers up the device. Interrupt Generation: This command does not generate interrupt.
RECNPLAY_RETVAL recplay_read_clk_cnfg | ( | recnplay_t * | ctx, |
uint8_t * | clk_cnfg ) |
Clock Configuration Read Command.
ctx | Click object. |
clk_cnfg | Memory where clock configuration byte be stored |
@description Function reads the clock configuration register. Interrupt Generation: This command does not generate interrupt.
RECNPLAY_RETVAL recplay_read_cnfg_reg | ( | recnplay_t * | ctx, |
uint8_t | reg_addr, | ||
uint8_t * | cnfg_data, | ||
uint8_t | n_data ) |
Configuration Read Command.
ctx | Click object. |
reg_addr | Configuration register address (from 0x00 to 0x2F) |
cnfg_data | Memory where configuration data be stored |
n_data | Number of data bytes to be read |
@description Function reads the configuration registers starting at the specified address. Interrupt Generation: This command does not generate interrupt.
RECNPLAY_RETVAL recplay_read_id | ( | recnplay_t * | ctx, |
recnplay_dev_id_t * | dev_id_data ) |
ISD3900 ID Read Command.
ctx | Click object. |
dev_id_data | Device ID data object |
@description Function reads device and memory ID. Interrupt Generation: This command does not generate interrupt.
RECNPLAY_RETVAL recplay_read_interr | ( | recnplay_t * | ctx, |
uint8_t * | interr_status ) |
Interrupt Read Command.
ctx | Click object. |
interr_status | Memory where interrupt status byte be stored |
@description Function queries the ISD3900 device status and clears any pending interrupts. Interrupt Generation: This command does not generate interrupt.
RECNPLAY_RETVAL recplay_read_msg_addr | ( | recnplay_t * | ctx, |
uint32_t * | msg_addr, | ||
uint16_t * | msg_length ) |
Recorded Message Address Read Command.
ctx | Click object. |
msg_addr | Memory where recorded message address will be stored |
msg_length | Memory where recorded message length will be stored |
@description Function reports the start address of the last or current message and message length. Interrupt Generation: This command does not generate interrupt.
RECNPLAY_RETVAL recplay_read_msg_length | ( | recnplay_t * | ctx, |
uint16_t * | msg_length ) |
Message Length Read Command.
ctx | Click object. |
msg_length | Memory where message length be stored |
@description Function reads number of sectors played by the last or current PLAY command. Interrupt Generation: This command does not generate interrupt.
RECNPLAY_RETVAL recplay_read_status | ( | recnplay_t * | ctx, |
uint8_t * | interr_status ) |
Status Read Command.
ctx | Click object. |
interr_status | Memory where interrupt status byte be stored |
@description Function queries the ISD3900 device status. Interrupt Generation: This command does not generate interrupt.
RECNPLAY_RETVAL recplay_record_msg | ( | recnplay_t * | ctx | ) |
Message Record Command.
ctx | Click object. |
@description Function initiates a managed record at first available location in memory. Interrupt Generation: CMD_ERR if not accepted, CMD_FIN when recording complete, FULL_ERR when device fills available memory.
RECNPLAY_RETVAL recplay_record_msg_addr | ( | recnplay_t * | ctx, |
uint32_t | mem_addr ) |
Message Record at Address Command.
ctx | Click object. |
mem_addr | Memory location |
@description Function initiates a managed record starting at a specified address. Interrupt Generation: CMD_ERR if not accepted, CMD_FIN when recording complete, FULL_ERR when device fills available memory, ADDR_ERR if invalid address sent.
void recplay_reset | ( | recnplay_t * | ctx | ) |
ISD3900 Reset Command.
ctx | Click object. |
@description Function performs the device reset and after that puts the device in normal operation mode.
RECNPLAY_RETVAL recplay_set_clk_cnfg | ( | recnplay_t * | ctx, |
uint8_t | clk_cnfg ) |
Clock Configuration Set Command.
clk_cnfg | Configuration byte for clock |
@description Function loads the clock configuration register. Interrupt Generation: This command does not generate interrupt.
RECNPLAY_RETVAL recplay_spi_read_pcm | ( | recnplay_t * | ctx, |
uint16_t * | data_pcm, | ||
uint8_t | num_pcm ) |
PCM Data SPI Read Command.
ctx | Click object. |
data_pcm | Memory where PCM data be stored |
num_pcm | Number of PCM words |
@description Function reads audio data in 16bit PCM format via SPI interface. Interrupt Generation: OVF_ERR if RDY/BSY violated.
RECNPLAY_RETVAL recplay_spi_receive_enc_data | ( | recnplay_t * | ctx, |
uint8_t * | encoded_data, | ||
uint8_t | n_data ) |
SPI Receive Encoded Data Command.
ctx | Click object. |
encoded_data | Memory where compressed audio data be stored |
n_data | Number of compressed data bytes |
@description Function reads compressed audio data via SPI intreface. Interrupt Generation: OVF_ERR if RDY/BSYB violated.
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.
ctx | Click object. |
cmprsd_data | Compressed audio data |
n_data | Number of compressed data bytes |
@description Function writes compressed audio data via SPI interface. Interrupt Generation: OVF_ERR if RDY/BSYB violated.
RECNPLAY_RETVAL recplay_spi_write_pcm | ( | recnplay_t * | ctx, |
uint16_t * | data_pcm, | ||
uint8_t | num_pcm ) |
PCM Data SPI Write Command.
ctx | Click object. |
data_pcm | Audio data in 16bit PCM format |
num_pcm | Number of PCM words |
@description Function writes audio data in 16bit PCM format via SPI interface. Interrupt Generation: OVF_ERR if RDY/BSY violated.
RECNPLAY_RETVAL recplay_stop | ( | recnplay_t * | ctx | ) |
Stop Command.
ctx | Click object. |
@description Function stops any current audio command. Interrupt Generation: Command itself does not generate interrupt, only those commands that it is stopping.
RECNPLAY_RETVAL recplay_write_cnfg_reg | ( | recnplay_t * | ctx, |
uint8_t | reg_addr, | ||
uint8_t * | cnfg_data, | ||
uint8_t | n_data ) |
Configuration Write Command.
ctx | Click object. |
reg_addr | Configuration register address (from 0x00 to 0x2F) |
cnfg_data | Configuration data to be written |
n_data | Number of data bytes to be written |
@description Function loads configuration registers starting at the specified address. Interrupt Generation: This command does not generate interrupt.