fft
Dependencies: BSP_DISCO_F746NG SDFileSystem_Warning_Fixed
mbed_src_STM32F7/hal/ethernet_api.h@0:3e46577dc273, 2016-10-09 (annotated)
- Committer:
- MikamiUitOpen
- Date:
- Sun Oct 09 10:11:14 2016 +0000
- Revision:
- 0:3e46577dc273
1
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
MikamiUitOpen | 0:3e46577dc273 | 1 | /* mbed Microcontroller Library |
MikamiUitOpen | 0:3e46577dc273 | 2 | * Copyright (c) 2006-2013 ARM Limited |
MikamiUitOpen | 0:3e46577dc273 | 3 | * |
MikamiUitOpen | 0:3e46577dc273 | 4 | * Licensed under the Apache License, Version 2.0 (the "License"); |
MikamiUitOpen | 0:3e46577dc273 | 5 | * you may not use this file except in compliance with the License. |
MikamiUitOpen | 0:3e46577dc273 | 6 | * You may obtain a copy of the License at |
MikamiUitOpen | 0:3e46577dc273 | 7 | * |
MikamiUitOpen | 0:3e46577dc273 | 8 | * http://www.apache.org/licenses/LICENSE-2.0 |
MikamiUitOpen | 0:3e46577dc273 | 9 | * |
MikamiUitOpen | 0:3e46577dc273 | 10 | * Unless required by applicable law or agreed to in writing, software |
MikamiUitOpen | 0:3e46577dc273 | 11 | * distributed under the License is distributed on an "AS IS" BASIS, |
MikamiUitOpen | 0:3e46577dc273 | 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
MikamiUitOpen | 0:3e46577dc273 | 13 | * See the License for the specific language governing permissions and |
MikamiUitOpen | 0:3e46577dc273 | 14 | * limitations under the License. |
MikamiUitOpen | 0:3e46577dc273 | 15 | */ |
MikamiUitOpen | 0:3e46577dc273 | 16 | #ifndef MBED_ETHERNET_API_H |
MikamiUitOpen | 0:3e46577dc273 | 17 | #define MBED_ETHERNET_API_H |
MikamiUitOpen | 0:3e46577dc273 | 18 | |
MikamiUitOpen | 0:3e46577dc273 | 19 | #include "device.h" |
MikamiUitOpen | 0:3e46577dc273 | 20 | |
MikamiUitOpen | 0:3e46577dc273 | 21 | #if DEVICE_ETHERNET |
MikamiUitOpen | 0:3e46577dc273 | 22 | |
MikamiUitOpen | 0:3e46577dc273 | 23 | #ifdef __cplusplus |
MikamiUitOpen | 0:3e46577dc273 | 24 | extern "C" { |
MikamiUitOpen | 0:3e46577dc273 | 25 | #endif |
MikamiUitOpen | 0:3e46577dc273 | 26 | |
MikamiUitOpen | 0:3e46577dc273 | 27 | // Connection constants |
MikamiUitOpen | 0:3e46577dc273 | 28 | |
MikamiUitOpen | 0:3e46577dc273 | 29 | int ethernet_init(void); |
MikamiUitOpen | 0:3e46577dc273 | 30 | void ethernet_free(void); |
MikamiUitOpen | 0:3e46577dc273 | 31 | |
MikamiUitOpen | 0:3e46577dc273 | 32 | // write size bytes from data to ethernet buffer |
MikamiUitOpen | 0:3e46577dc273 | 33 | // return num bytes written |
MikamiUitOpen | 0:3e46577dc273 | 34 | // or -1 if size is too big |
MikamiUitOpen | 0:3e46577dc273 | 35 | int ethernet_write(const char *data, int size); |
MikamiUitOpen | 0:3e46577dc273 | 36 | |
MikamiUitOpen | 0:3e46577dc273 | 37 | // send ethernet write buffer, returning the packet size sent |
MikamiUitOpen | 0:3e46577dc273 | 38 | int ethernet_send(void); |
MikamiUitOpen | 0:3e46577dc273 | 39 | |
MikamiUitOpen | 0:3e46577dc273 | 40 | // recieve from ethernet buffer, returning packet size, or 0 if no packet |
MikamiUitOpen | 0:3e46577dc273 | 41 | int ethernet_receive(void); |
MikamiUitOpen | 0:3e46577dc273 | 42 | |
MikamiUitOpen | 0:3e46577dc273 | 43 | // read size bytes in to data, return actual num bytes read (0..size) |
MikamiUitOpen | 0:3e46577dc273 | 44 | // if data == NULL, throw the bytes away |
MikamiUitOpen | 0:3e46577dc273 | 45 | int ethernet_read(char *data, int size); |
MikamiUitOpen | 0:3e46577dc273 | 46 | |
MikamiUitOpen | 0:3e46577dc273 | 47 | // get the ethernet address |
MikamiUitOpen | 0:3e46577dc273 | 48 | void ethernet_address(char *mac); |
MikamiUitOpen | 0:3e46577dc273 | 49 | |
MikamiUitOpen | 0:3e46577dc273 | 50 | // see if the link is up |
MikamiUitOpen | 0:3e46577dc273 | 51 | int ethernet_link(void); |
MikamiUitOpen | 0:3e46577dc273 | 52 | |
MikamiUitOpen | 0:3e46577dc273 | 53 | // force link settings |
MikamiUitOpen | 0:3e46577dc273 | 54 | void ethernet_set_link(int speed, int duplex); |
MikamiUitOpen | 0:3e46577dc273 | 55 | |
MikamiUitOpen | 0:3e46577dc273 | 56 | #ifdef __cplusplus |
MikamiUitOpen | 0:3e46577dc273 | 57 | } |
MikamiUitOpen | 0:3e46577dc273 | 58 | #endif |
MikamiUitOpen | 0:3e46577dc273 | 59 | |
MikamiUitOpen | 0:3e46577dc273 | 60 | #endif |
MikamiUitOpen | 0:3e46577dc273 | 61 | |
MikamiUitOpen | 0:3e46577dc273 | 62 | #endif |
MikamiUitOpen | 0:3e46577dc273 | 63 |