diff src/aci2/aci/ati_audio.c @ 264:3edeadec6804

aci2: AT@SPKR command implemented
author Mychaela Falconia <falcon@freecalypso.org>
date Fri, 04 Aug 2017 20:50:23 +0000
parents 3b8d291ed45a
children d85305a74518
line wrap: on
line diff
--- a/src/aci2/aci/ati_audio.c	Fri Aug 04 20:29:46 2017 +0000
+++ b/src/aci2/aci/ati_audio.c	Fri Aug 04 20:50:23 2017 +0000
@@ -66,6 +66,26 @@
 #include "audio/audio_api.h"
 #include "audio.h"	/* Condat */
 
+#include "fc-target.cfg"
+#include "armio.h"
+
+#ifdef CONFIG_TARGET_FCDEV3B
+/* AT@SPKR - turn loudspeaker amplifier on or off */
+GLOBAL T_ATI_RSLT atAtSPKR ( char *cl, UBYTE srcId )
+{
+	int state;
+
+	cl = parse(cl, "D", &state);
+	if (!cl)
+		return (ATI_FAIL);
+	if (state)
+		AI_SetBit(1);
+	else
+		AI_ResetBit(1);
+	return (ATI_CMPL);
+}
+#endif
+
 /* AT@SND - emit sound through Condat API */
 GLOBAL T_ATI_RSLT atAtSND ( char *cl, UBYTE srcId )
 {