Firmware for MNT ZZ9000 graphics and ARM coprocessor card for Amiga computers.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

ethernet.h 1.3KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. /*
  2. * MNT ZZ9000 Amiga Graphics and Coprocessor Card Operating System (ZZ9000OS)
  3. *
  4. * Copyright (C) 2019, Lukas F. Hartmann <lukas@mntre.com>
  5. * MNT Research GmbH, Berlin
  6. * https://mntre.com
  7. *
  8. * More Info: https://mntre.com/zz9000
  9. *
  10. * SPDX-License-Identifier: GPL-3.0-or-later
  11. * GNU General Public License v3.0 or later
  12. *
  13. * https://spdx.org/licenses/GPL-3.0-or-later.html
  14. *
  15. */
  16. #ifndef ETHERNET_H_
  17. #define ETHERNET_H_
  18. int ethernet_init();
  19. u16 ethernet_send_frame(u16 frame_size);
  20. void ethernet_receive_frame();
  21. u32 get_frames_received();
  22. uint8_t* ethernet_get_mac_address_ptr();
  23. void ethernet_update_mac_address();
  24. uint8_t* ethernet_current_receive_ptr();
  25. int ethernet_get_backlog();
  26. // FIXME allocate this memory properly
  27. #define TX_BD_LIST_START_ADDRESS 0x03100000
  28. #define RX_BD_LIST_START_ADDRESS 0x03108000
  29. #define TX_FRAME_ADDRESS 0x03110000
  30. #define RX_FRAME_ADDRESS 0x03120000
  31. #define RX_BACKLOG_ADDRESS 0x03200000 // 32 * 2048 space (64 kB)
  32. #define USB_BLOCK_STORAGE_ADDRESS 0x04000000 // FIXME move all of these to a memory table header file
  33. #define RX_FRAME_PAD 4
  34. #define FRAME_SIZE 2048
  35. #define FRAME_MAX_BACKLOG 32
  36. #define RXBD_CNT 1 /* Number of RxBDs to use */
  37. #define TXBD_CNT 2 /* Number of TxBDs to use */
  38. #endif