diff options
author | Ashish Chaudhari <ashish@ettus.com> | 2016-01-08 13:47:28 -0800 |
---|---|---|
committer | Ashish Chaudhari <ashish@ettus.com> | 2016-01-08 13:47:28 -0800 |
commit | aada5568494bdaff2d4814b5ccadd7def66b92f3 (patch) | |
tree | e0d57a7d6d402b485db65d9fd95d97c00ea6cd65 /firmware/usrp3/n230/n230_fw_host_iface.h | |
parent | aa38ea64e950325d43cc284f59878044ea4f935a (diff) | |
download | uhd-aada5568494bdaff2d4814b5ccadd7def66b92f3.tar.gz uhd-aada5568494bdaff2d4814b5ccadd7def66b92f3.tar.bz2 uhd-aada5568494bdaff2d4814b5ccadd7def66b92f3.zip |
usrp3,n230: Moved all shared FW-Host headers to the host dir
Diffstat (limited to 'firmware/usrp3/n230/n230_fw_host_iface.h')
-rw-r--r-- | firmware/usrp3/n230/n230_fw_host_iface.h | 128 |
1 files changed, 0 insertions, 128 deletions
diff --git a/firmware/usrp3/n230/n230_fw_host_iface.h b/firmware/usrp3/n230/n230_fw_host_iface.h deleted file mode 100644 index dc82df2fc..000000000 --- a/firmware/usrp3/n230/n230_fw_host_iface.h +++ /dev/null @@ -1,128 +0,0 @@ -// -// Copyright 2014 Ettus Research LLC -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program. If not, see <http://www.gnu.org/licenses/>. -// - -#ifndef INCLUDED_N230_FW_HOST_IFACE_H -#define INCLUDED_N230_FW_HOST_IFACE_H - -#include <stdint.h> - -/*! - * Structs and constants for N230 communication between firmware and host. - * This header is shared by the firmware and host code. - * Therefore, this header may only contain valid C code. - */ -#ifdef __cplusplus -extern "C" { -#endif - -//-------------------------------------------------- -// Ethernet related -// -#define N230_DEFAULT_ETH0_MAC {0x00, 0x50, 0xC2, 0x85, 0x3f, 0xff} -#define N230_DEFAULT_ETH1_MAC {0x00, 0x50, 0xC2, 0x85, 0x3f, 0x33} -#define N230_DEFAULT_ETH0_IP (192 << 24 | 168 << 16 | 10 << 8 | 2 << 0) -#define N230_DEFAULT_ETH1_IP (192 << 24 | 168 << 16 | 20 << 8 | 2 << 0) -#define N230_DEFAULT_ETH0_MASK (255 << 24 | 255 << 16 | 255 << 8 | 0 << 0) -#define N230_DEFAULT_ETH1_MASK (255 << 24 | 255 << 16 | 255 << 8 | 0 << 0) -#define N230_DEFAULT_GATEWAY (192 << 24 | 168 << 16 | 10 << 8 | 1 << 0) - -#define N230_FW_COMMS_UDP_PORT 49152 -#define N230_FW_COMMS_CVITA_PORT 49153 -#define N230_FW_COMMS_FLASH_PROG_PORT 49154 -// -//-------------------------------------------------- - -//-------------------------------------------------- -// Memory shared with host -// -#define N230_FW_HOST_SHMEM_BASE_ADDR 0x10000 -#define N230_FW_HOST_SHMEM_RW_BASE_ADDR 0x1000C -#define N230_FW_HOST_SHMEM_NUM_WORDS (sizeof(n230_host_shared_mem_data_t)/sizeof(uint32_t)) - -#define N230_FW_HOST_SHMEM_MAX_ADDR \ - (N230_FW_HOST_SHMEM_BASE_ADDR + ((N230_FW_HOST_SHMEM_NUM_WORDS - 1) * sizeof(uint32_t))) - -#define N230_FW_HOST_SHMEM_OFFSET(member) \ - (N230_FW_HOST_SHMEM_BASE_ADDR + ((uint32_t)offsetof(n230_host_shared_mem_data_t, member))) - -//The shared memory block can only be accessed on 32-bit boundaries -typedef struct { //All fields must be 32-bit wide to avoid packing directives - //Read-Only fields (N230_FW_HOST_SHMEM_BASE_ADDR) - uint32_t fw_compat_num; //Compat number must be at offset 0 - uint32_t fw_version_hash; - uint32_t claim_status; - - //Read-Write fields (N230_FW_HOST_SHMEM_RW_BASE_ADDR) - uint32_t scratch; - uint32_t claim_time; - uint32_t claim_src; -} n230_host_shared_mem_data_t; - -typedef union -{ - uint32_t buff[N230_FW_HOST_SHMEM_NUM_WORDS]; - n230_host_shared_mem_data_t data; -} n230_host_shared_mem_t; - -#define N230_FW_PRODUCT_ID 1 -#define N230_FW_COMPAT_NUM_MAJOR 3 -#define N230_FW_COMPAT_NUM_MINOR 0 -#define N230_FW_COMPAT_NUM (((N230_FW_COMPAT_NUM_MAJOR & 0xFF) << 16) | (N230_FW_COMPAT_NUM_MINOR & 0xFFFF)) -// -//-------------------------------------------------- - -//-------------------------------------------------- -// Flash read-write interface for host -// -#define N230_FLASH_COMM_FLAGS_ACK 0x00000001 -#define N230_FLASH_COMM_FLAGS_CMD_MASK 0x00000FF0 -#define N230_FLASH_COMM_FLAGS_ERROR_MASK 0xFF000000 - -#define N230_FLASH_COMM_CMD_READ_NV_DATA 0x00000010 -#define N230_FLASH_COMM_CMD_WRITE_NV_DATA 0x00000020 -#define N230_FLASH_COMM_CMD_READ_FPGA 0x00000030 -#define N230_FLASH_COMM_CMD_WRITE_FPGA 0x00000040 -#define N230_FLASH_COMM_CMD_ERASE_FPGA 0x00000050 - -#define N230_FLASH_COMM_ERR_PKT_ERROR 0x80000000 -#define N230_FLASH_COMM_ERR_CMD_ERROR 0x40000000 -#define N230_FLASH_COMM_ERR_SIZE_ERROR 0x20000000 - -#define N230_FLASH_COMM_MAX_PAYLOAD_SIZE 128 - -typedef struct -{ - uint32_t flags; - uint32_t seq; - uint32_t offset; - uint32_t size; - uint8_t data[N230_FLASH_COMM_MAX_PAYLOAD_SIZE]; -} n230_flash_prog_t; -// -//-------------------------------------------------- - -#define N230_HW_REVISION_COMPAT 1 -#define N230_HW_REVISION_MIN 1 - - -#define N230_CLAIMER_TIMEOUT_IN_MS 2000 - -#ifdef __cplusplus -} -#endif - -#endif /* INCLUDED_N230_FW_HOST_IFACE_H */ |