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/BusInOut.h@16:cbb726ac20d8, 2016-10-02 (annotated)
- Committer:
- MikamiUitOpen
- Date:
- Sun Oct 02 06:33:59 2016 +0000
- Revision:
- 16:cbb726ac20d8
17
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_BUSINOUT_H |
MikamiUitOpen | 16:cbb726ac20d8 | 17 | #define MBED_BUSINOUT_H |
MikamiUitOpen | 16:cbb726ac20d8 | 18 | |
MikamiUitOpen | 16:cbb726ac20d8 | 19 | #include "DigitalInOut.h" |
MikamiUitOpen | 16:cbb726ac20d8 | 20 | |
MikamiUitOpen | 16:cbb726ac20d8 | 21 | namespace mbed { |
MikamiUitOpen | 16:cbb726ac20d8 | 22 | |
MikamiUitOpen | 16:cbb726ac20d8 | 23 | /** A digital input output bus, used for setting the state of a collection of pins |
MikamiUitOpen | 16:cbb726ac20d8 | 24 | */ |
MikamiUitOpen | 16:cbb726ac20d8 | 25 | class BusInOut { |
MikamiUitOpen | 16:cbb726ac20d8 | 26 | |
MikamiUitOpen | 16:cbb726ac20d8 | 27 | public: |
MikamiUitOpen | 16:cbb726ac20d8 | 28 | |
MikamiUitOpen | 16:cbb726ac20d8 | 29 | /** Create an BusInOut, connected to the specified pins |
MikamiUitOpen | 16:cbb726ac20d8 | 30 | * |
MikamiUitOpen | 16:cbb726ac20d8 | 31 | * @param p<n> DigitalInOut pin to connect to bus bit p<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 | BusInOut(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 | BusInOut(PinName pins[16]); |
MikamiUitOpen | 16:cbb726ac20d8 | 43 | |
MikamiUitOpen | 16:cbb726ac20d8 | 44 | virtual ~BusInOut(); |
MikamiUitOpen | 16:cbb726ac20d8 | 45 | |
MikamiUitOpen | 16:cbb726ac20d8 | 46 | /* Group: Access Methods */ |
MikamiUitOpen | 16:cbb726ac20d8 | 47 | |
MikamiUitOpen | 16:cbb726ac20d8 | 48 | /** Write the value to the output bus |
MikamiUitOpen | 16:cbb726ac20d8 | 49 | * |
MikamiUitOpen | 16:cbb726ac20d8 | 50 | * @param value An integer specifying a bit to write for every corresponding DigitalInOut pin |
MikamiUitOpen | 16:cbb726ac20d8 | 51 | */ |
MikamiUitOpen | 16:cbb726ac20d8 | 52 | void write(int value); |
MikamiUitOpen | 16:cbb726ac20d8 | 53 | |
MikamiUitOpen | 16:cbb726ac20d8 | 54 | /** Read the value currently output on the bus |
MikamiUitOpen | 16:cbb726ac20d8 | 55 | * |
MikamiUitOpen | 16:cbb726ac20d8 | 56 | * @returns |
MikamiUitOpen | 16:cbb726ac20d8 | 57 | * An integer with each bit corresponding to associated DigitalInOut pin setting |
MikamiUitOpen | 16:cbb726ac20d8 | 58 | */ |
MikamiUitOpen | 16:cbb726ac20d8 | 59 | int read(); |
MikamiUitOpen | 16:cbb726ac20d8 | 60 | |
MikamiUitOpen | 16:cbb726ac20d8 | 61 | /** Set as an output |
MikamiUitOpen | 16:cbb726ac20d8 | 62 | */ |
MikamiUitOpen | 16:cbb726ac20d8 | 63 | void output(); |
MikamiUitOpen | 16:cbb726ac20d8 | 64 | |
MikamiUitOpen | 16:cbb726ac20d8 | 65 | /** Set as an input |
MikamiUitOpen | 16:cbb726ac20d8 | 66 | */ |
MikamiUitOpen | 16:cbb726ac20d8 | 67 | void input(); |
MikamiUitOpen | 16:cbb726ac20d8 | 68 | |
MikamiUitOpen | 16:cbb726ac20d8 | 69 | /** Set the input pin mode |
MikamiUitOpen | 16:cbb726ac20d8 | 70 | * |
MikamiUitOpen | 16:cbb726ac20d8 | 71 | * @param mode PullUp, PullDown, PullNone |
MikamiUitOpen | 16:cbb726ac20d8 | 72 | */ |
MikamiUitOpen | 16:cbb726ac20d8 | 73 | void mode(PinMode pull); |
MikamiUitOpen | 16:cbb726ac20d8 | 74 | |
MikamiUitOpen | 16:cbb726ac20d8 | 75 | /** Binary mask of bus pins connected to actual pins (not NC pins) |
MikamiUitOpen | 16:cbb726ac20d8 | 76 | * 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 | 77 | * |
MikamiUitOpen | 16:cbb726ac20d8 | 78 | * @returns |
MikamiUitOpen | 16:cbb726ac20d8 | 79 | * Binary mask of connected pins |
MikamiUitOpen | 16:cbb726ac20d8 | 80 | */ |
MikamiUitOpen | 16:cbb726ac20d8 | 81 | int mask() { |
MikamiUitOpen | 16:cbb726ac20d8 | 82 | return _nc_mask; |
MikamiUitOpen | 16:cbb726ac20d8 | 83 | } |
MikamiUitOpen | 16:cbb726ac20d8 | 84 | |
MikamiUitOpen | 16:cbb726ac20d8 | 85 | #ifdef MBED_OPERATORS |
MikamiUitOpen | 16:cbb726ac20d8 | 86 | /** A shorthand for write() |
MikamiUitOpen | 16:cbb726ac20d8 | 87 | */ |
MikamiUitOpen | 16:cbb726ac20d8 | 88 | BusInOut& operator= (int v); |
MikamiUitOpen | 16:cbb726ac20d8 | 89 | BusInOut& operator= (BusInOut& rhs); |
MikamiUitOpen | 16:cbb726ac20d8 | 90 | |
MikamiUitOpen | 16:cbb726ac20d8 | 91 | /** Access to particular bit in random-iterator fashion |
MikamiUitOpen | 16:cbb726ac20d8 | 92 | */ |
MikamiUitOpen | 16:cbb726ac20d8 | 93 | DigitalInOut& operator[] (int index); |
MikamiUitOpen | 16:cbb726ac20d8 | 94 | |
MikamiUitOpen | 16:cbb726ac20d8 | 95 | /** A shorthand for read() |
MikamiUitOpen | 16:cbb726ac20d8 | 96 | */ |
MikamiUitOpen | 16:cbb726ac20d8 | 97 | operator int(); |
MikamiUitOpen | 16:cbb726ac20d8 | 98 | #endif |
MikamiUitOpen | 16:cbb726ac20d8 | 99 | |
MikamiUitOpen | 16:cbb726ac20d8 | 100 | protected: |
MikamiUitOpen | 16:cbb726ac20d8 | 101 | DigitalInOut* _pin[16]; |
MikamiUitOpen | 16:cbb726ac20d8 | 102 | |
MikamiUitOpen | 16:cbb726ac20d8 | 103 | /** Mask of bus's NC pins |
MikamiUitOpen | 16:cbb726ac20d8 | 104 | * If bit[n] is set to 1 - pin is connected |
MikamiUitOpen | 16:cbb726ac20d8 | 105 | * if bit[n] is cleared - pin is not connected (NC) |
MikamiUitOpen | 16:cbb726ac20d8 | 106 | */ |
MikamiUitOpen | 16:cbb726ac20d8 | 107 | int _nc_mask; |
MikamiUitOpen | 16:cbb726ac20d8 | 108 | |
MikamiUitOpen | 16:cbb726ac20d8 | 109 | /* disallow copy constructor and assignment operators */ |
MikamiUitOpen | 16:cbb726ac20d8 | 110 | private: |
MikamiUitOpen | 16:cbb726ac20d8 | 111 | BusInOut(const BusInOut&); |
MikamiUitOpen | 16:cbb726ac20d8 | 112 | BusInOut & operator = (const BusInOut&); |
MikamiUitOpen | 16:cbb726ac20d8 | 113 | }; |
MikamiUitOpen | 16:cbb726ac20d8 | 114 | |
MikamiUitOpen | 16:cbb726ac20d8 | 115 | } // namespace mbed |
MikamiUitOpen | 16:cbb726ac20d8 | 116 | |
MikamiUitOpen | 16:cbb726ac20d8 | 117 | #endif |