Microchip® Advanced Software Framework

matrix.h File Reference

Matrix driver for SAM.

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

#include "compiler.h"

Macros

#define MATRIX_MCFG_ULBT(value)   MATRIX_MCFG0_ULBT(value)
 

Enumerations

enum  arbitration_type_t {
  MATRIX_ARBT_ROUND_ROBIN = MATRIX_SCFG_ARBT(0),
  MATRIX_ARBT_FIXED_PRIORITY = MATRIX_SCFG_ARBT(1)
}
 Matrix slave: arbitration type. More...
 
enum  burst_type_t {
  MATRIX_ULBT_INFINITE_LENGTH_BURST = MATRIX_MCFG_ULBT(0),
  MATRIX_ULBT_SINGLE_ACCESS = MATRIX_MCFG_ULBT(1),
  MATRIX_ULBT_4_BEAT_BURST = MATRIX_MCFG_ULBT(2),
  MATRIX_ULBT_8_BEAT_BURST = MATRIX_MCFG_ULBT(3),
  MATRIX_ULBT_16_BEAT_BURST = MATRIX_MCFG_ULBT(4)
}
 Matrix master: undefined length burst type. More...
 
enum  defaut_master_t {
  MATRIX_DEFMSTR_NO_DEFAULT_MASTER = MATRIX_SCFG_DEFMSTR_TYPE(0),
  MATRIX_DEFMSTR_LAST_DEFAULT_MASTER = MATRIX_SCFG_DEFMSTR_TYPE(1),
  MATRIX_DEFMSTR_FIXED_DEFAULT_MASTER = MATRIX_SCFG_DEFMSTR_TYPE(2)
}
 Matrix slave: default master type. More...
 

Functions

burst_type_t matrix_get_master_burst_type (uint32_t ul_id)
 Get undefined length burst type of the specified master. More...
 
arbitration_type_t matrix_get_slave_arbitration_type (uint32_t ul_id)
 Get slave arbitration type of the specified slave. More...
 
defaut_master_t matrix_get_slave_default_master_type (uint32_t ul_id)
 Get default master type of the specified slave. More...
 
uint32_t matrix_get_slave_fixed_default_master (uint32_t ul_id)
 Get fixed default master of the specified slave. More...
 
uint32_t matrix_get_slave_priority (uint32_t ul_id)
 Get priority for the specified slave access. More...
 
uint32_t matrix_get_slave_slot_cycle (uint32_t ul_id)
 Get slot cycle of the specified slave. More...
 
uint32_t matrix_get_writeprotect_status (void)
 Get write protect status. More...
 
void matrix_set_master_burst_type (uint32_t ul_id, burst_type_t burst_type)
 Set undefined length burst type of the specified master. More...
 
void matrix_set_slave_arbitration_type (uint32_t ul_id, arbitration_type_t type)
 Set slave arbitration type of the specified slave. More...
 
void matrix_set_slave_default_master_type (uint32_t ul_id, defaut_master_t type)
 Set default master type of the specified slave. More...
 
void matrix_set_slave_fixed_default_master (uint32_t ul_id, uint32_t ul_fixed_id)
 Set fixed default master of the specified slave. More...
 
void matrix_set_slave_priority (uint32_t ul_id, uint32_t ul_prio)
 Set priority for the specified slave access. More...
 
void matrix_set_slave_slot_cycle (uint32_t ul_id, uint32_t ul_slot_cycle)
 Set slot cycle of the specified slave. More...
 
void matrix_set_writeprotect (uint32_t ul_enable)
 Enable or disable write protect of MATRIX registers. More...
 

#define MATRIX_MCFG_ULBT (   value)    MATRIX_MCFG0_ULBT(value)

Matrix slave: arbitration type.

Enumerator
MATRIX_ARBT_ROUND_ROBIN 
MATRIX_ARBT_FIXED_PRIORITY 

Matrix master: undefined length burst type.

Enumerator
MATRIX_ULBT_INFINITE_LENGTH_BURST 
MATRIX_ULBT_SINGLE_ACCESS 
MATRIX_ULBT_4_BEAT_BURST 
MATRIX_ULBT_8_BEAT_BURST 
MATRIX_ULBT_16_BEAT_BURST 

Matrix slave: default master type.

Enumerator
MATRIX_DEFMSTR_NO_DEFAULT_MASTER 
MATRIX_DEFMSTR_LAST_DEFAULT_MASTER 
MATRIX_DEFMSTR_FIXED_DEFAULT_MASTER