SAM SERCOM I2C Slave with DMA Quick Start Guide.
Copyright (c) 2014-2018 Microchip Technology Inc. and its subsidiaries.
#include <asf.h>
Macros | |
#define | DATA_LENGTH 10 |
[address] More... | |
#define | SLAVE_ADDRESS 0x12 |
[address] More... | |
Functions | |
void | configure_dma_resource (struct dma_resource *resource) |
[configure_dac_channel] More... | |
void | configure_i2c_slave (void) |
[module] More... | |
int | main (void) |
void | setup_dma_descriptor (DmacDescriptor *descriptor) |
[config_dma_resource] More... | |
Variables | |
struct dma_resource | i2c_dma_resource |
[initialize_i2c] More... | |
struct i2c_slave_module | i2c_slave_instance |
[packet_data] More... | |
uint8_t | read_buffer [DATA_LENGTH] |
DmacDescriptor i2c_dma_descriptor | SECTION_DMAC_DESCRIPTOR |
[dma_resource] More... | |
#define DATA_LENGTH 10 |
#define SLAVE_ADDRESS 0x12 |
[address]
void configure_dma_resource | ( | struct dma_resource * | resource | ) |
[configure_dac_channel]
[_transfer_done]
[config_dma_resource]
[dma_setup_1]
[dma_setup_1]
[dma_setup_2]
[dma_setup_2]
[dma_setup_3]
[dma_setup_3]
[dma_setup_4]
[dma_setup_4]
References dma_allocate(), dma_get_config_defaults(), DMA_TRIGGER_ACTION_BEAT, dma_resource_config::peripheral_trigger, and dma_resource_config::trigger_action.
void configure_i2c_slave | ( | void | ) |
[module]
[initialize_i2c]
[init_conf]
[init_conf]
[conf_changes]
[conf_changes]
[init_module]
[init_module]
[enable_module]
[enable_module]
int main | ( | void | ) |
[init] [config_i2c]
[config_i2c]
[config_dma]
[config_dma] [init]
[main] [wait_packet]
[wait_packet]
[clear_status]
[clear_status] [main]
References configure_dma_resource(), configure_i2c_slave(), dma_add_descriptor(), dma_start_transfer_job(), i2c_dma_resource, i2c_slave_dma_read_interrupt_status(), i2c_slave_dma_write_interrupt_status(), i2c_slave_instance, setup_dma_descriptor(), and system_init().
void setup_dma_descriptor | ( | DmacDescriptor * | descriptor | ) |
[config_dma_resource]
[setup_dma_transfer_descriptor]
[dma_setup_5]
[dma_setup_5]
[dma_setup_6]
[dma_setup_6]
[dma_setup_7]
[dma_setup_7]
[dma_setup_8]
[dma_setup_8]
References dma_descriptor_config::beat_size, dma_descriptor_config::block_transfer_count, DATA_LENGTH, dma_descriptor_config::destination_address, DMA_BEAT_SIZE_BYTE, dma_descriptor_create(), dma_descriptor_get_config_defaults(), i2c_slave_instance, read_buffer, dma_descriptor_config::source_address, and dma_descriptor_config::src_increment_enable.
struct dma_resource i2c_dma_resource |
struct i2c_slave_module i2c_slave_instance |
[packet_data]
[module]
uint8_t read_buffer[DATA_LENGTH] |
DmacDescriptor i2c_dma_descriptor SECTION_DMAC_DESCRIPTOR |