Microchip® Advanced Software Framework

freertos_peripheral_control_private.h File Reference

Generic FreeRTOS peripheral control functions.

Copyright (c) 2012-2018 Microchip Technology Inc. and its subsidiaries.

Data Structures

struct  freertos_dma_tx_control
 
struct  freertos_pdc_rx_control
 
struct  freertos_peripheral_parameters
 

Macros

#define freertos_start_pdc_rx(dma_event_control, data, len, pdc_base_address, notification_semaphore)   freertos_start_pdc_transfer(dma_event_control, data, len, pdc_base_address, notification_semaphore, false)
 
#define freertos_start_pdc_tx(dma_event_control, data, len, pdc_base_address, notification_semaphore)   freertos_start_pdc_transfer(dma_event_control, data, len, pdc_base_address, notification_semaphore, true)
 

Typedefs

typedef struct
freertos_dma_tx_control 
freertos_dma_event_control_t
 
typedef struct
freertos_peripheral_parameters 
freertos_pdc_peripheral_parameters_t
 
typedef struct
freertos_pdc_rx_control 
freertos_pdc_rx_control_t
 

Functions

bool check_requested_operating_mode (const enum peripheral_operation_mode requested_operation_mode, const enum peripheral_operation_mode valid_operating_modes[], portBASE_TYPE num_valid_operating_modes)
 
void configure_interrupt_controller (const enum IRQn peripheral_irq, uint32_t interrupt_priority)
 
void create_peripheral_control_semaphores (const uint8_t options_flags, freertos_dma_event_control_t *tx_dma_control, freertos_dma_event_control_t *rx_dma_control)
 
uint32_t freertos_copy_bytes_from_pdc_circular_buffer (freertos_pdc_rx_control_t *p_rx_buffer_details, uint32_t next_byte_to_be_written, uint8_t *buf, uint32_t bytes_to_read)
 
status_code_t freertos_obtain_peripheral_access_semphore (freertos_dma_event_control_t *dma_event_control, portTickType *max_block_time_ticks)
 
status_code_t freertos_optionally_wait_transfer_completion (freertos_dma_event_control_t *dma_event_control, xSemaphoreHandle notification_semaphore, portTickType max_block_time_ticks)
 
void freertos_start_pdc_transfer (freertos_dma_event_control_t *dma_event_control, const uint8_t *data, size_t len, void *pdc_base_address, xSemaphoreHandle notification_semaphore, bool is_transmitting)
 
portBASE_TYPE get_pdc_peripheral_details (const freertos_pdc_peripheral_parameters_t peripheral_array[], size_t array_size, void *peripheral_to_find)
 

#define freertos_start_pdc_rx (   dma_event_control,
  data,
  len,
  pdc_base_address,
  notification_semaphore 
)    freertos_start_pdc_transfer(dma_event_control, data, len, pdc_base_address, notification_semaphore, false)
#define freertos_start_pdc_tx (   dma_event_control,
  data,
  len,
  pdc_base_address,
  notification_semaphore 
)    freertos_start_pdc_transfer(dma_event_control, data, len, pdc_base_address, notification_semaphore, true)

bool check_requested_operating_mode ( const enum peripheral_operation_mode  requested_operation_mode,
const enum peripheral_operation_mode  valid_operating_modes[],
portBASE_TYPE  num_valid_operating_modes 
)
void configure_interrupt_controller ( const enum IRQn  peripheral_irq,
uint32_t  interrupt_priority 
)
void freertos_start_pdc_transfer ( freertos_dma_event_control_t dma_event_control,
const uint8_t *  data,
size_t  len,
void *  pdc_base_address,
xSemaphoreHandle  notification_semaphore,
bool  is_transmitting 
)