Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Diff: dac.c
- Revision:
- 0:88f4eeea871a
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/dac.c Sat Mar 19 20:35:51 2011 +0000
@@ -0,0 +1,21 @@
+#include "dac.h"
+
+#include "cbn1768.h"
+
+#define DAC_BIAS 0x00010000
+/*----------------------------------------------------------*\
+ | DAC Initial |
+\*----------------------------------------------------------*/
+void dac_init( void ) {
+ /* setup the related pin to DAC output */
+ PINSEL1 |1<<21;
+ return;
+ }
+
+
+void dac_gonder(int deger)
+{
+
+DACR = (deger << 6) | DAC_BIAS;
+
+}