This shows you the differences between two versions of the page.
| Next revision | Previous revision | ||
| pt:software:homelab:library:module:ethernet [2015/12/09 17:10] – Criação deste novo documento. artica | pt:software:homelab:library:module:ethernet [2020/07/20 09:00] (current) – external edit 127.0.0.1 | ||
|---|---|---|---|
| Line 7: | Line 7: | ||
| ===== Constantes ===== | ===== Constantes ===== | ||
| - | * **//static uint8_t mymac[6] = {0x54, | + | * **//static uint8_t mymac[6] = {0x54, |
| - | * **//static uint8_t myip[4] = {192, | + | * **//static uint8_t myip[4] = {192, |
| - | * **//static uint8_t buf[BUFFER_SIZE+1]// | + | * **//static uint8_t buf[BUFFER_SIZE+1]// |
| - | ===== Functions | + | ===== Funções |
| * **//void ethernet_standby(void)// | * **//void ethernet_standby(void)// | ||
| - | | + | |
| * **//void ethernet_init(uint8_t *mac, uint8_t *ip)//** \\ | * **//void ethernet_init(uint8_t *mac, uint8_t *ip)//** \\ | ||
| - | Ethernet | + | |
| - | | + | |
| - | * //*mac// - MAC address | + | * //*mac// - array de endereço MAC. |
| - | * //*ip// - IP address | + | * //*ip// - array de endereço de IP. |
| * **// | * **// | ||
| - | | + | |
| - | | + | |
| - | * //maxlen// - maximum allowed data buffer | + | * //maxlen// - tamanho máximo permitido do buffer |
| - | * //*buffer// - array where to save received data for further operations. | + | * //*buffer// - array para gravação dos dados recebidos para operações posteriores. |
| - | * If the packet has arrived, returns the length of the received packet in bytes and in opposite case returns | + | * Se um pacote chegou, devolve o tamanho do mesmo em bytes, caso contrário devolve |
| * **// | * **// | ||
| - | | + | |
| - | | + | |
| - | * //*buf// - data array to analyze. | + | * //*buf// - array de dados a verificar. |
| - | * //plen// - length of received packet in bytes. | + | * //plen// - comprimento do pacote recebido em bytes. |
| - | * Tagastab | + | * Devolve o endereço do primeiro caracter no URL. Se o URL for vazio, devolve |
| - | * Returns the address of the first char in URL. If URL is empty, it will return 0. | + | |
| * **// | * **// | ||
| //** \\ | //** \\ | ||
| - | | + | |
| - | | + | |
| - | * //*buf// - data arrya to send using TCP. | + | * //*buf// - array de dados para envio usando |
| - | * //pos// - data end address in buffer | + | * //pos// - endereço do fim dos dados no buffer |
| - | * // | + | * // |
| - | * Retruns end address of data array which can be input as a parameter for loading next HTML-code. | + | * Devolve o endereço do fim do array de dados que pode ser usado como parâmetro de entrada para carregar o próximo código |
| * **//void ethernet_print_webpage (uint8_t *buf, | * **//void ethernet_print_webpage (uint8_t *buf, | ||
| - | | + | |
| - | | + | |
| - | * //*buf// - Data array where HTLM is preloaded. | + | * //*buf// - Array de dados onde o HTML foi carregado. |
| - | * //dplen// - End address of data in buffer | + | * //dplen// - Endereço do fim dos dados no buffer |
| - | ~~PB~~ | + | < |
| - | ===== Example | + | ===== Exemplo |
| <code c> | <code c> | ||