this hurts

Dependencies:   FFT

Committer:
shyamgatech
Date:
Thu Dec 03 18:15:35 2020 +0000
Revision:
7:0d62545e6d73
Parent:
0:d6c9b09b4042
addded gui mbed code;

Who changed what in which revision?

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