int main(void) { myinit(); //uint32_t rv = rng_uint32(); can_send_data(0); for (;;) { HAL_Delay(1000); led_toggle(); } }
static err_t low_level_output(struct netif *netif, struct pbuf *p) { struct ethernetif *ethernetif = netif->state; struct pbuf *q; //initiate transfer(); #if ETH_PAD_SIZE pbuf_header(p, -ETH_PAD_SIZE); /* drop the padding word */ #endif for (q = p; q != NULL; q = q->next) { /* Send the data from the pbuf to the interface, one pbuf at a time. The size of the data in each pbuf is kept in the ->len variable. */ //send data from(q->payload, q->len); can_send_data(q->payload, q->len); //printf("[%d] ", q->len); //for (int i = 0; i < q->len; i++) //{ // printf("%02x ", ((u8_t*)q->payload)[i]); //} //printf("\r\n"); } // that packet should be sent(); #if ETH_PAD_SIZE pbuf_header(p, ETH_PAD_SIZE); /* reclaim the padding word */ #endif //LINK_STATS_INC(link.xmit); return ERR_OK; }