diff options
author | Gregory Nutt <gnutt@nuttx.org> | 2014-07-31 11:14:57 -0600 |
---|---|---|
committer | Gregory Nutt <gnutt@nuttx.org> | 2014-07-31 11:14:57 -0600 |
commit | fb5abc7406ccf2a60916ef9e27dbda17340c63a5 (patch) | |
tree | fd2c8e1bad9303217fc1fd7aa8ced85a644aaef6 /nuttx/configs/sama5d3x-ek/src/sam_nsh.c | |
parent | 49ce5fbe3b51dfab403915d36b12d2c8c5adf206 (diff) | |
download | px4-nuttx-fb5abc7406ccf2a60916ef9e27dbda17340c63a5.tar.gz px4-nuttx-fb5abc7406ccf2a60916ef9e27dbda17340c63a5.tar.bz2 px4-nuttx-fb5abc7406ccf2a60916ef9e27dbda17340c63a5.zip |
SAMA5D3X-EK: Add support for the WM8904 audio CODEC
Diffstat (limited to 'nuttx/configs/sama5d3x-ek/src/sam_nsh.c')
-rw-r--r-- | nuttx/configs/sama5d3x-ek/src/sam_nsh.c | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/nuttx/configs/sama5d3x-ek/src/sam_nsh.c b/nuttx/configs/sama5d3x-ek/src/sam_nsh.c index dc62c193e..e057c5144 100644 --- a/nuttx/configs/sama5d3x-ek/src/sam_nsh.c +++ b/nuttx/configs/sama5d3x-ek/src/sam_nsh.c @@ -1,7 +1,7 @@ /**************************************************************************** * config/sama5d3x-ek/src/sam_nsh.c * - * Copyright (C) 2013 Gregory Nutt. All rights reserved. + * Copyright (C) 2013-2014 Gregory Nutt. All rights reserved. * Author: Gregory Nutt <gnutt@nuttx.org> * * Redistribution and use in source and binary forms, with or without @@ -86,8 +86,9 @@ int nsh_archinitialize(void) { -#if defined(HAVE_NAND) || defined(HAVE_AT25) || defined(HAVE_AT24) || \ - defined(HAVE_HSMCI) || defined(HAVE_USBHOST) || defined(HAVE_USBMONITOR) +#if defined(HAVE_NAND) || defined(HAVE_AT25) || defined(HAVE_AT24) || \ + defined(HAVE_HSMCI) || defined(HAVE_USBHOST) || defined(HAVE_USBMONITOR) ||\ + defined(HAVE_WM8904) int ret; #endif @@ -173,5 +174,15 @@ int nsh_archinitialize(void) } #endif +#ifdef HAVE_WM8904 + /* Configure WM8904 audio */ + + ret = sam_wm8904_initialize(0); + if (ret != OK) + { + message("ERROR: Failed to initialize WM8904 audio: %d\n", ret); + } +#endif + return OK; } |