comparison include/Bela.h @ 303:421a69d42943 prerelease

Changed BeagleRT -> Bela in defines and thread names; some preliminary mux capelet stuff
author andrewm
date Fri, 27 May 2016 17:40:44 +0100
parents e4392164b458
children ff5f346a293e
comparison
equal deleted inserted replaced
302:b26e7c61e3b6 303:421a69d42943
19 * which incorporates stereo audio with 8x, 16-bit analog inputs and outputs. 19 * which incorporates stereo audio with 8x, 16-bit analog inputs and outputs.
20 * 20 *
21 * Bela is based on the Xenomai real-time Linux extensions (http://xenomai.org) and 21 * Bela is based on the Xenomai real-time Linux extensions (http://xenomai.org) and
22 * uses the BeagleBone %PRU subsystem to address the audio and sensor hardware. 22 * uses the BeagleBone %PRU subsystem to address the audio and sensor hardware.
23 * 23 *
24 * Further information can be found at http://beaglert.cc 24 * Further information can be found at http://bela.io
25 */ 25 */
26 26
27 27
28 #ifndef BEAGLERT_H_ 28 #ifndef BELA_H_
29 #define BEAGLERT_H_ 29 #define BELA_H_
30 30
31 #include <stdint.h> 31 #include <stdint.h>
32 #include <unistd.h> 32 #include <unistd.h>
33 #include <rtdk.h> 33 #include <rtdk.h>
34 #include "digital_gpio_mapping.h" 34 #include "digital_gpio_mapping.h"
53 * 53 *
54 * Xenomai priority level for audio processing. Maximum possible priority is 99. 54 * Xenomai priority level for audio processing. Maximum possible priority is 99.
55 * In general, all auxiliary tasks should have a level lower than this unless for\ 55 * In general, all auxiliary tasks should have a level lower than this unless for\
56 * special purposes where the task needs to interrupt audio processing. 56 * special purposes where the task needs to interrupt audio processing.
57 */ 57 */
58 #define BEAGLERT_AUDIO_PRIORITY 95 58 #define BELA_AUDIO_PRIORITY 95
59 59
60 // Default volume levels 60 // Default volume levels
61 61
62 /** 62 /**
63 * \addtogroup levels 63 * \addtogroup levels
88 /** @} */ 88 /** @} */
89 89
90 /** 90 /**
91 * Flag for BelaContext. If set, indicates the audio and analog buffers are interleaved. 91 * Flag for BelaContext. If set, indicates the audio and analog buffers are interleaved.
92 */ 92 */
93 #define BEAGLERT_FLAG_INTERLEAVED (1 << 0) // Set if buffers are interleaved 93 #define BELA_FLAG_INTERLEAVED (1 << 0) // Set if buffers are interleaved
94 /** 94 /**
95 * Flag for BelaContext. If set, indicates analog outputs persist for future frames. 95 * Flag for BelaContext. If set, indicates analog outputs persist for future frames.
96 */ 96 */
97 #define BEAGLERT_FLAG_ANALOG_OUTPUTS_PERSIST (1 << 1) // Set if analog/digital outputs persist for future buffers 97 #define BELA_FLAG_ANALOG_OUTPUTS_PERSIST (1 << 1) // Set if analog/digital outputs persist for future buffers
98 98
99 /** 99 /**
100 * \ingroup control 100 * \ingroup control
101 * \brief Structure containing initialisation parameters for the real-time 101 * \brief Structure containing initialisation parameters for the real-time
102 * audio control system. 102 * audio control system.
253 253
254 /// \brief Other audio/sensor settings 254 /// \brief Other audio/sensor settings
255 /// 255 ///
256 /// Binary combination of flags including: 256 /// Binary combination of flags including:
257 /// 257 ///
258 /// BEAGLERT_FLAG_INTERLEAVED: indicates the audio and analog buffers are interleaved 258 /// BELA_FLAG_INTERLEAVED: indicates the audio and analog buffers are interleaved
259 /// 259 ///
260 /// BEAGLERT_FLAG_ANALOG_OUTPUTS_PERSIST: indicates that writes to the analog outputs will 260 /// BELA_FLAG_ANALOG_OUTPUTS_PERSIST: indicates that writes to the analog outputs will
261 /// persist for future frames. If not set, writes affect one frame only. 261 /// persist for future frames. If not set, writes affect one frame only.
262 uint32_t flags; 262 uint32_t flags;
263 } BelaContext; 263 } BelaContext;
264 264
265 /** \ingroup auxtask 265 /** \ingroup auxtask
574 * This function creates a new auxiliary task which, when scheduled, runs the function specified 574 * This function creates a new auxiliary task which, when scheduled, runs the function specified
575 * in the first argument. Note that the task does not run until scheduleAuxiliaryTask() is called. 575 * in the first argument. Note that the task does not run until scheduleAuxiliaryTask() is called.
576 * Auxiliary tasks should be created in setup() and never in render() itself. 576 * Auxiliary tasks should be created in setup() and never in render() itself.
577 * 577 *
578 * The second argument specifies the real-time priority. Valid values are between 0 578 * The second argument specifies the real-time priority. Valid values are between 0
579 * and 99, and usually should be lower than \ref BEAGLERT_AUDIO_PRIORITY. Tasks with higher priority always 579 * and 99, and usually should be lower than \ref BELA_AUDIO_PRIORITY. Tasks with higher priority always
580 * preempt tasks with lower priority. 580 * preempt tasks with lower priority.
581 * 581 *
582 * \param functionToCall Function which will run each time the auxiliary task is scheduled. 582 * \param functionToCall Function which will run each time the auxiliary task is scheduled.
583 * \param priority Xenomai priority level at which the task should run. 583 * \param priority Xenomai priority level at which the task should run.
584 * \param name Name for this task, which should be unique system-wide (no other running program should use this name). 584 * \param name Name for this task, which should be unique system-wide (no other running program should use this name).
616 void Bela_autoScheduleAuxiliaryTasks(); 616 void Bela_autoScheduleAuxiliaryTasks();
617 617
618 /** @} */ 618 /** @} */
619 #include <Utilities.h> 619 #include <Utilities.h>
620 620
621 #endif /* BEAGLERT_H_ */ 621 #endif /* BELA_H_ */