XCORE SDK
XCORE Software Development Kit
pdm_resources.h
1 // Copyright 2021-2022 XMOS LIMITED.
2 // This Software is subject to the terms of the XMOS Public Licence: Version 1.
3 #pragma once
4 
5 #include "api.h"
6 #include "etc/xcore_compat.h"
7 
8 #include "xs3_math.h"
9 
10 #include <stdint.h>
11 
17 C_API_START
18 
19 
31 MA_C_API
32 typedef struct {
33 
42  port_t p_mclk;
43 
52  port_t p_pdm_clk;
53 
63  port_t p_pdm_mics;
64 
71  clock_t clock_a;
72 
81  clock_t clock_b;
83 
84 
98 #define PDM_RX_RESOURCES_SDR(P_MCLK, P_PDM_CLK, P_PDM_MICS, CLOCK_A) \
99  { (port_t) (P_MCLK), (port_t) (P_PDM_CLK), (port_t) (P_PDM_MICS), \
100  (clock_t) (CLOCK_A) }
101 
102 
114 #define PDM_RX_RESOURCES_DDR(P_MCLK, P_PDM_CLK, P_PDM_MICS, CLOCK_A, CLOCK_B) \
115  { (port_t) (P_MCLK), (port_t) (P_PDM_CLK), (port_t) (P_PDM_MICS), \
116  (clock_t) (CLOCK_A), (clock_t) (CLOCK_B) }
117 
118 
119 
120 C_API_END
Collection of resources IDs required for PDM capture.
Definition: pdm_resources.h:32
clock_t clock_a
ID of the clock block used to derive the PDM clock from the master audio clock.
Definition: pdm_resources.h:71
port_t p_pdm_mics
ID of the port on which PDM samples are received.
Definition: pdm_resources.h:63
clock_t clock_b
ID of the clock block used only in DDR configurations to trigger reads of the PDM data.
Definition: pdm_resources.h:81
port_t p_mclk
ID of the 1-bit port on which the master audio clock signal is received.
Definition: pdm_resources.h:42
port_t p_pdm_clk
ID of the 1-bit port through which the PDM sample clock is signaled.
Definition: pdm_resources.h:52