1 /* 2 * Copyright (C) 2015-2017 Alibaba Group Holding Limited 3 */ 4 5 #include <stdio.h> 6 #include <stdint.h> 7 #include <string.h> 8 9 #include "aos/kernel.h" 10 #include "aos/hal/dac.h" 11 #include "dac_test.h" 12 13 dac_dev_t dac_dev; 14 hal_dac_test(void)15void hal_dac_test(void) 16 { 17 int ret = -1; 18 19 printf("*********** dac test start ! ***********\n"); 20 21 dac_dev.port = PORT_DAC_TEST; 22 ret = hal_dac_init(&dac_dev); 23 if (ret != 0) { 24 printf("hal_dac_init error !\n"); 25 return; 26 } 27 28 ret = hal_dac_finalize(&dac_dev); 29 if (ret != 0) { 30 printf("hal_dac_finalize error !\n"); 31 return; 32 } 33 34 printf("dac test result: succeed !\n"); 35 36 printf("*********** dac test end ! ***********\n"); 37 } 38