Mozzi  version v2.0
sound synthesis library for Arduino
config_checks_renesas.h
1 /*
2  * config_checks_renesas.h
3  *
4  * This file is part of Mozzi.
5  *
6  * Copyright 2023-2024 Thomas Friedrichsmeier and the Mozzi Team
7  *
8  * Mozzi is licensed under the GNU Lesser General Public Licence (LGPL) Version 2.1 or later.
9  *
10 */
11 
12 #ifndef CONFIG_CHECK_RENESAS_H
13 #define CONFIG_CHECK_RENESAS_H
14 
45 #if not IS_RENESAS()
46 #error This header should be included for RENESAS (Arduino Uno R4) architecture, only
47 #endif
48 
49 #include "disable_2pinmode_on_github_workflow.h"
50 #if !defined(MOZZI_AUDIO_MODE)
51 #define MOZZI_AUDIO_MODE MOZZI_OUTPUT_INTERNAL_DAC
52 #endif
53 MOZZI_CHECK_SUPPORTED(MOZZI_AUDIO_MODE, MOZZI_OUTPUT_EXTERNAL_TIMED, MOZZI_OUTPUT_EXTERNAL_CUSTOM, MOZZI_OUTPUT_INTERNAL_DAC)
54 
55 #if !defined(MOZZI_AUDIO_RATE)
56 #define MOZZI_AUDIO_RATE 32768
57 #endif
58 
59 #if defined(MOZZI_PWM_RATE)
60 #error Configuration of MOZZI_PWM_RATE is not currently supported on this platform (always same as MOZZI_AUDIO_RATE)
61 #endif
62 
63 #if !defined(MOZZI_ANALOG_READ)
64 # define MOZZI_ANALOG_READ MOZZI_ANALOG_READ_STANDARD
65 #endif
66 
67 MOZZI_CHECK_SUPPORTED(MOZZI_ANALOG_READ, MOZZI_ANALOG_READ_NONE, MOZZI_ANALOG_READ_STANDARD)
68 
69 #if MOZZI_IS(MOZZI_AUDIO_MODE, MOZZI_OUTPUT_INTERNAL_DAC)
70 # if !defined(MOZZI_AUDIO_BITS)
71 # define MOZZI_AUDIO_BITS 12
72 # endif
73 # if !defined(MOZZI_AUDIO_PIN_1)
74 # define MOZZI_AUDIO_PIN_1 A0
75 # endif
76 # define BYPASS_MOZZI_OUTPUT_BUFFER true
77 # include "disable_stereo_on_github_workflow.h"
78 MOZZI_CHECK_SUPPORTED(MOZZI_AUDIO_CHANNELS, 1)
79 #endif
80 
81 #define MOZZI__INTERNAL_ANALOG_READ_RESOLUTION 14
82 
83 #endif // #ifndef CONFIG_CHECK_RENESAS_H
#define MOZZI_AUDIO_CHANNELS
This sets allows to change from a single/mono audio output channel to stereo output.
#define MOZZI_AUDIO_MODE
Configure how Mozzi outputs generated sounds.
#define MOZZI_ANALOG_READ
Whether to compile in support for non-blocking analog reads.