/* * Copyright (C) 2018 ETH Zurich and University of Bologna * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #ifndef __ARCHI_UDMA_UDMA_V3_H__ #define __ARCHI_UDMA_UDMA_V3_H__ /* * Global register map */ // The UDMA register map is made of several channels, each channel area size is defined just below // Periph area size in log2 #define UDMA_PERIPH_AREA_SIZE_LOG2 7 // Periph area size #define UDMA_PERIPH_AREA_SIZE (1<>UDMA_PERIPH_AREA_SIZE_LOG2) // Return the offset of a channel from its identifier #define UDMA_CHANNEL_OFFSET(id) ((id)<>UDMA_CHANNEL_SIZE_LOG2) // Return the id of a channel from the peripheral id #define UDMA_CHANNEL_ID(id) ((id)*2) // Return the number of events per peripheral #define UDMA_NB_PERIPH_EVENTS_LOG2 2 #define UDMA_NB_PERIPH_EVENTS (1<