Skip to content

Commit

Permalink
All examples building cleanly (not fully tested yet tho)
Browse files Browse the repository at this point in the history
  • Loading branch information
ed-xmos committed Sep 20, 2024
1 parent 48814ea commit 96f2e5d
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 14 deletions.
1 change: 0 additions & 1 deletion examples/common/src/dac3101/dac3101.c
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
// Copyright 2021-2022 XMOS LIMITED.
// This Software is subject to the terms of the XMOS Public Licence: Version 1.

#include <platform.h>
#include <xclib.h>
#include <xs1.h>

Expand Down
1 change: 0 additions & 1 deletion examples/demo_par_decimator/src/app.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
#include <stdint.h>
#include <xcore/channel_streaming.h>
#include <xcore/interrupt.h>
#include <platform.h>

#include "app_config.h"
#include "app_mic_array.hpp"
Expand Down
22 changes: 11 additions & 11 deletions examples/demo_par_decimator/src/app_config.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
// LEDs, and USB.

// X0D00, J14 - Pin 2
#define APP_PORT_PDM_CLK XS1_PORT_1A
#define PORT_PDM_CLK XS1_PORT_1A

#if MIC_ARRAY_CONFIG_MIC_COUNT == 8
// Either of the following ports may be used with VocalSorcery adapter card.
Expand All @@ -38,23 +38,23 @@
//#define PORT_PDM_DATA XS1_PORT_4C

// X0D16..X0D19, J14 - Pin 6,7,10,11
#define APP_PORT_PDM_DATA XS1_PORT_4D
#define PORT_PDM_DATA XS1_PORT_4D

#elif MIC_ARRAY_CONFIG_MIC_COUNT == 16
// X0D14..X0D21 | J14 - Pin 3,5,12,14 and Pin 6,7,10,11
#define APP_PORT_PDM_DATA XS1_PORT_8B
#define PORT_PDM_DATA XS1_PORT_8B

#endif // MIC_ARRAY_CONFIG_MIC_COUNT

#if PORT_PDM_DATA == XS1_PORT_4C
// X1D09
#define APP_PORT_CODEC_RST_N XS1_PORT_4A
#define PORT_CODEC_RST_N XS1_PORT_4A
#endif

// NOTE: This conditional only works if the other 4 data lines are not connected.
//#if USE_BUTTONS && (PORT_PDM_DATA == XS1_PORT_4D || PORT_PDM_DATA == XS1_PORT_8B)
// X0D12, J12 - Pin2
#define APP_ALTERNATE_BUTTON XS1_PORT_1E
#define ALTERNATE_BUTTON XS1_PORT_1E
//#endif

#else // MIC_ARRAY_TILE == 0
Expand All @@ -67,7 +67,7 @@
// there are only 14 usable MICs of the 16 for this configuration.

// X1D36, J10 - Pin 2
#define APP_PORT_PDM_CLK XS1_PORT_1M
#define PORT_PDM_CLK XS1_PORT_1M

#if MIC_ARRAY_CONFIG_MIC_COUNT == 8
// Either of the following ports may be used with VocalSorcery adapter card.
Expand All @@ -76,23 +76,23 @@
//#define PORT_PDM_DATA XS1_PORT_4A

// X1D04..X1D07 | J10 - Pin 6,7,10,11
#define APP_PORT_PDM_DATA XS1_PORT_4B
#define PORT_PDM_DATA XS1_PORT_4B

#if PORT_PDM_DATA == XS1_PORT_4B
#define APP_PORT_CODEC_RST_N XS1_PORT_4A
#define PORT_CODEC_RST_N XS1_PORT_4A
#else
// X1D38 | J10 - Pin 15
// Used with 3k3 resistor to drive CODEC_RST_N high
#define APP_PORT_CODEC_RST_N XS1_PORT_1O
#define PORT_CODEC_RST_N XS1_PORT_1O
#endif

#elif MIC_ARRAY_CONFIG_MIC_COUNT == 16
// X1D02..X1D09 | J10 - Pin 3,5,12 and Pin 6,7,10,11
#define APP_PORT_PDM_DATA XS1_PORT_8B
#define PORT_PDM_DATA XS1_PORT_8B

// X1D38 | J10 - Pin 15
// Used with 3k3 resistor to drive CODEC_RST_N high
#define APP_PORT_CODEC_RST_N XS1_PORT_1O
#define PORT_CODEC_RST_N XS1_PORT_1O

#endif // MIC_ARRAY_CONFIG_MIC_COUNT

Expand Down
2 changes: 1 addition & 1 deletion examples/demo_vanilla/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ foreach( N_MICS 1 2 )
-DMIC_ARRAY_CONFIG_USE_DDR=1
-DMIC_ARRAY_CONFIG_PORT_MCLK=PORT_MCLK_IN_OUT
-DMIC_ARRAY_CONFIG_PORT_PDM_CLK=PORT_PDM_CLK
-DMIC_ARRAY_CONFIG_PORT_PDM_DATA=PORT_PDM_DAT
-DMIC_ARRAY_CONFIG_PORT_PDM_DATA=PORT_PDM_DATA
-DAPP_NAME="VANILLA_${CONFIG}")
endforeach()

Expand Down

0 comments on commit 96f2e5d

Please sign in to comment.