Output the audio signal with filtering by graphic equalizer in the *.wav file on the SD card using onboard CODEC. SD カードの *.wav ファイルのオーディオ信号をグラフィック・イコライザを通して,ボードに搭載されているCODEC で出力する.
Dependencies: F746_GUI F746_SAI_IO SD_PlayerSkeleton FrequencyResponseDrawer
mbed_src_STM32F7/api/BusOut.h@24:f78f9d0ac262, 2017-04-10 (annotated)
- Committer:
- MikamiUitOpen
- Date:
- Mon Apr 10 04:07:35 2017 +0000
- Revision:
- 24:f78f9d0ac262
- Parent:
- 16:cbb726ac20d8
25
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
MikamiUitOpen | 16:cbb726ac20d8 | 1 | /* mbed Microcontroller Library |
MikamiUitOpen | 16:cbb726ac20d8 | 2 | * Copyright (c) 2006-2013 ARM Limited |
MikamiUitOpen | 16:cbb726ac20d8 | 3 | * |
MikamiUitOpen | 16:cbb726ac20d8 | 4 | * Licensed under the Apache License, Version 2.0 (the "License"); |
MikamiUitOpen | 16:cbb726ac20d8 | 5 | * you may not use this file except in compliance with the License. |
MikamiUitOpen | 16:cbb726ac20d8 | 6 | * You may obtain a copy of the License at |
MikamiUitOpen | 16:cbb726ac20d8 | 7 | * |
MikamiUitOpen | 16:cbb726ac20d8 | 8 | * http://www.apache.org/licenses/LICENSE-2.0 |
MikamiUitOpen | 16:cbb726ac20d8 | 9 | * |
MikamiUitOpen | 16:cbb726ac20d8 | 10 | * Unless required by applicable law or agreed to in writing, software |
MikamiUitOpen | 16:cbb726ac20d8 | 11 | * distributed under the License is distributed on an "AS IS" BASIS, |
MikamiUitOpen | 16:cbb726ac20d8 | 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
MikamiUitOpen | 16:cbb726ac20d8 | 13 | * See the License for the specific language governing permissions and |
MikamiUitOpen | 16:cbb726ac20d8 | 14 | * limitations under the License. |
MikamiUitOpen | 16:cbb726ac20d8 | 15 | */ |
MikamiUitOpen | 16:cbb726ac20d8 | 16 | #ifndef MBED_BUSOUT_H |
MikamiUitOpen | 16:cbb726ac20d8 | 17 | #define MBED_BUSOUT_H |
MikamiUitOpen | 16:cbb726ac20d8 | 18 | |
MikamiUitOpen | 16:cbb726ac20d8 | 19 | #include "DigitalOut.h" |
MikamiUitOpen | 16:cbb726ac20d8 | 20 | |
MikamiUitOpen | 16:cbb726ac20d8 | 21 | namespace mbed { |
MikamiUitOpen | 16:cbb726ac20d8 | 22 | |
MikamiUitOpen | 16:cbb726ac20d8 | 23 | /** A digital output bus, used for setting the state of a collection of pins |
MikamiUitOpen | 16:cbb726ac20d8 | 24 | */ |
MikamiUitOpen | 16:cbb726ac20d8 | 25 | class BusOut { |
MikamiUitOpen | 16:cbb726ac20d8 | 26 | |
MikamiUitOpen | 16:cbb726ac20d8 | 27 | public: |
MikamiUitOpen | 16:cbb726ac20d8 | 28 | |
MikamiUitOpen | 16:cbb726ac20d8 | 29 | /** Create an BusOut, connected to the specified pins |
MikamiUitOpen | 16:cbb726ac20d8 | 30 | * |
MikamiUitOpen | 16:cbb726ac20d8 | 31 | * @param p<n> DigitalOut pin to connect to bus bit <n> (p5-p30, NC) |
MikamiUitOpen | 16:cbb726ac20d8 | 32 | * |
MikamiUitOpen | 16:cbb726ac20d8 | 33 | * @note |
MikamiUitOpen | 16:cbb726ac20d8 | 34 | * It is only required to specify as many pin variables as is required |
MikamiUitOpen | 16:cbb726ac20d8 | 35 | * for the bus; the rest will default to NC (not connected) |
MikamiUitOpen | 16:cbb726ac20d8 | 36 | */ |
MikamiUitOpen | 16:cbb726ac20d8 | 37 | BusOut(PinName p0, PinName p1 = NC, PinName p2 = NC, PinName p3 = NC, |
MikamiUitOpen | 16:cbb726ac20d8 | 38 | PinName p4 = NC, PinName p5 = NC, PinName p6 = NC, PinName p7 = NC, |
MikamiUitOpen | 16:cbb726ac20d8 | 39 | PinName p8 = NC, PinName p9 = NC, PinName p10 = NC, PinName p11 = NC, |
MikamiUitOpen | 16:cbb726ac20d8 | 40 | PinName p12 = NC, PinName p13 = NC, PinName p14 = NC, PinName p15 = NC); |
MikamiUitOpen | 16:cbb726ac20d8 | 41 | |
MikamiUitOpen | 16:cbb726ac20d8 | 42 | BusOut(PinName pins[16]); |
MikamiUitOpen | 16:cbb726ac20d8 | 43 | |
MikamiUitOpen | 16:cbb726ac20d8 | 44 | virtual ~BusOut(); |
MikamiUitOpen | 16:cbb726ac20d8 | 45 | |
MikamiUitOpen | 16:cbb726ac20d8 | 46 | /** Write the value to the output bus |
MikamiUitOpen | 16:cbb726ac20d8 | 47 | * |
MikamiUitOpen | 16:cbb726ac20d8 | 48 | * @param value An integer specifying a bit to write for every corresponding DigitalOut pin |
MikamiUitOpen | 16:cbb726ac20d8 | 49 | */ |
MikamiUitOpen | 16:cbb726ac20d8 | 50 | void write(int value); |
MikamiUitOpen | 16:cbb726ac20d8 | 51 | |
MikamiUitOpen | 16:cbb726ac20d8 | 52 | /** Read the value currently output on the bus |
MikamiUitOpen | 16:cbb726ac20d8 | 53 | * |
MikamiUitOpen | 16:cbb726ac20d8 | 54 | * @returns |
MikamiUitOpen | 16:cbb726ac20d8 | 55 | * An integer with each bit corresponding to associated DigitalOut pin setting |
MikamiUitOpen | 16:cbb726ac20d8 | 56 | */ |
MikamiUitOpen | 16:cbb726ac20d8 | 57 | int read(); |
MikamiUitOpen | 16:cbb726ac20d8 | 58 | |
MikamiUitOpen | 16:cbb726ac20d8 | 59 | /** Binary mask of bus pins connected to actual pins (not NC pins) |
MikamiUitOpen | 16:cbb726ac20d8 | 60 | * If bus pin is in NC state make corresponding bit will be cleared (set to 0), else bit will be set to 1 |
MikamiUitOpen | 16:cbb726ac20d8 | 61 | * |
MikamiUitOpen | 16:cbb726ac20d8 | 62 | * @returns |
MikamiUitOpen | 16:cbb726ac20d8 | 63 | * Binary mask of connected pins |
MikamiUitOpen | 16:cbb726ac20d8 | 64 | */ |
MikamiUitOpen | 16:cbb726ac20d8 | 65 | int mask() { |
MikamiUitOpen | 16:cbb726ac20d8 | 66 | return _nc_mask; |
MikamiUitOpen | 16:cbb726ac20d8 | 67 | } |
MikamiUitOpen | 16:cbb726ac20d8 | 68 | |
MikamiUitOpen | 16:cbb726ac20d8 | 69 | #ifdef MBED_OPERATORS |
MikamiUitOpen | 16:cbb726ac20d8 | 70 | /** A shorthand for write() |
MikamiUitOpen | 16:cbb726ac20d8 | 71 | */ |
MikamiUitOpen | 16:cbb726ac20d8 | 72 | BusOut& operator= (int v); |
MikamiUitOpen | 16:cbb726ac20d8 | 73 | BusOut& operator= (BusOut& rhs); |
MikamiUitOpen | 16:cbb726ac20d8 | 74 | |
MikamiUitOpen | 16:cbb726ac20d8 | 75 | /** Access to particular bit in random-iterator fashion |
MikamiUitOpen | 16:cbb726ac20d8 | 76 | */ |
MikamiUitOpen | 16:cbb726ac20d8 | 77 | DigitalOut& operator[] (int index); |
MikamiUitOpen | 16:cbb726ac20d8 | 78 | |
MikamiUitOpen | 16:cbb726ac20d8 | 79 | /** A shorthand for read() |
MikamiUitOpen | 16:cbb726ac20d8 | 80 | */ |
MikamiUitOpen | 16:cbb726ac20d8 | 81 | operator int(); |
MikamiUitOpen | 16:cbb726ac20d8 | 82 | #endif |
MikamiUitOpen | 16:cbb726ac20d8 | 83 | |
MikamiUitOpen | 16:cbb726ac20d8 | 84 | protected: |
MikamiUitOpen | 16:cbb726ac20d8 | 85 | DigitalOut* _pin[16]; |
MikamiUitOpen | 16:cbb726ac20d8 | 86 | |
MikamiUitOpen | 16:cbb726ac20d8 | 87 | /** Mask of bus's NC pins |
MikamiUitOpen | 16:cbb726ac20d8 | 88 | * If bit[n] is set to 1 - pin is connected |
MikamiUitOpen | 16:cbb726ac20d8 | 89 | * if bit[n] is cleared - pin is not connected (NC) |
MikamiUitOpen | 16:cbb726ac20d8 | 90 | */ |
MikamiUitOpen | 16:cbb726ac20d8 | 91 | int _nc_mask; |
MikamiUitOpen | 16:cbb726ac20d8 | 92 | |
MikamiUitOpen | 16:cbb726ac20d8 | 93 | /* disallow copy constructor and assignment operators */ |
MikamiUitOpen | 16:cbb726ac20d8 | 94 | private: |
MikamiUitOpen | 16:cbb726ac20d8 | 95 | BusOut(const BusOut&); |
MikamiUitOpen | 16:cbb726ac20d8 | 96 | BusOut & operator = (const BusOut&); |
MikamiUitOpen | 16:cbb726ac20d8 | 97 | }; |
MikamiUitOpen | 16:cbb726ac20d8 | 98 | |
MikamiUitOpen | 16:cbb726ac20d8 | 99 | } // namespace mbed |
MikamiUitOpen | 16:cbb726ac20d8 | 100 | |
MikamiUitOpen | 16:cbb726ac20d8 | 101 | #endif |