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/common/Ethernet.cpp@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 | #include "Ethernet.h" |
MikamiUitOpen | 16:cbb726ac20d8 | 17 | |
MikamiUitOpen | 16:cbb726ac20d8 | 18 | #if DEVICE_ETHERNET |
MikamiUitOpen | 16:cbb726ac20d8 | 19 | |
MikamiUitOpen | 16:cbb726ac20d8 | 20 | #include "ethernet_api.h" |
MikamiUitOpen | 16:cbb726ac20d8 | 21 | |
MikamiUitOpen | 16:cbb726ac20d8 | 22 | namespace mbed { |
MikamiUitOpen | 16:cbb726ac20d8 | 23 | |
MikamiUitOpen | 16:cbb726ac20d8 | 24 | Ethernet::Ethernet() { |
MikamiUitOpen | 16:cbb726ac20d8 | 25 | ethernet_init(); |
MikamiUitOpen | 16:cbb726ac20d8 | 26 | } |
MikamiUitOpen | 16:cbb726ac20d8 | 27 | |
MikamiUitOpen | 16:cbb726ac20d8 | 28 | Ethernet::~Ethernet() { |
MikamiUitOpen | 16:cbb726ac20d8 | 29 | ethernet_free(); |
MikamiUitOpen | 16:cbb726ac20d8 | 30 | } |
MikamiUitOpen | 16:cbb726ac20d8 | 31 | |
MikamiUitOpen | 16:cbb726ac20d8 | 32 | int Ethernet::write(const char *data, int size) { |
MikamiUitOpen | 16:cbb726ac20d8 | 33 | return ethernet_write(data, size); |
MikamiUitOpen | 16:cbb726ac20d8 | 34 | } |
MikamiUitOpen | 16:cbb726ac20d8 | 35 | |
MikamiUitOpen | 16:cbb726ac20d8 | 36 | int Ethernet::send() { |
MikamiUitOpen | 16:cbb726ac20d8 | 37 | return ethernet_send(); |
MikamiUitOpen | 16:cbb726ac20d8 | 38 | } |
MikamiUitOpen | 16:cbb726ac20d8 | 39 | |
MikamiUitOpen | 16:cbb726ac20d8 | 40 | int Ethernet::receive() { |
MikamiUitOpen | 16:cbb726ac20d8 | 41 | return ethernet_receive(); |
MikamiUitOpen | 16:cbb726ac20d8 | 42 | } |
MikamiUitOpen | 16:cbb726ac20d8 | 43 | |
MikamiUitOpen | 16:cbb726ac20d8 | 44 | int Ethernet::read(char *data, int size) { |
MikamiUitOpen | 16:cbb726ac20d8 | 45 | return ethernet_read(data, size); |
MikamiUitOpen | 16:cbb726ac20d8 | 46 | } |
MikamiUitOpen | 16:cbb726ac20d8 | 47 | |
MikamiUitOpen | 16:cbb726ac20d8 | 48 | void Ethernet::address(char *mac) { |
MikamiUitOpen | 16:cbb726ac20d8 | 49 | return ethernet_address(mac); |
MikamiUitOpen | 16:cbb726ac20d8 | 50 | } |
MikamiUitOpen | 16:cbb726ac20d8 | 51 | |
MikamiUitOpen | 16:cbb726ac20d8 | 52 | int Ethernet::link() { |
MikamiUitOpen | 16:cbb726ac20d8 | 53 | return ethernet_link(); |
MikamiUitOpen | 16:cbb726ac20d8 | 54 | } |
MikamiUitOpen | 16:cbb726ac20d8 | 55 | |
MikamiUitOpen | 16:cbb726ac20d8 | 56 | void Ethernet::set_link(Mode mode) { |
MikamiUitOpen | 16:cbb726ac20d8 | 57 | int speed = -1; |
MikamiUitOpen | 16:cbb726ac20d8 | 58 | int duplex = 0; |
MikamiUitOpen | 16:cbb726ac20d8 | 59 | |
MikamiUitOpen | 16:cbb726ac20d8 | 60 | switch(mode) { |
MikamiUitOpen | 16:cbb726ac20d8 | 61 | case AutoNegotiate : speed = -1; duplex = 0; break; |
MikamiUitOpen | 16:cbb726ac20d8 | 62 | case HalfDuplex10 : speed = 0; duplex = 0; break; |
MikamiUitOpen | 16:cbb726ac20d8 | 63 | case FullDuplex10 : speed = 0; duplex = 1; break; |
MikamiUitOpen | 16:cbb726ac20d8 | 64 | case HalfDuplex100 : speed = 1; duplex = 0; break; |
MikamiUitOpen | 16:cbb726ac20d8 | 65 | case FullDuplex100 : speed = 1; duplex = 1; break; |
MikamiUitOpen | 16:cbb726ac20d8 | 66 | } |
MikamiUitOpen | 16:cbb726ac20d8 | 67 | |
MikamiUitOpen | 16:cbb726ac20d8 | 68 | ethernet_set_link(speed, duplex); |
MikamiUitOpen | 16:cbb726ac20d8 | 69 | } |
MikamiUitOpen | 16:cbb726ac20d8 | 70 | |
MikamiUitOpen | 16:cbb726ac20d8 | 71 | } // namespace mbed |
MikamiUitOpen | 16:cbb726ac20d8 | 72 | |
MikamiUitOpen | 16:cbb726ac20d8 | 73 | #endif |