GNU Radio 3.3.0 C++ API
|
00001 /* -*- c++ -*- */ 00002 /* 00003 * Copyright 2007,2008,2009 Free Software Foundation, Inc. 00004 * 00005 * This file is part of GNU Radio 00006 * 00007 * GNU Radio is free software; you can redistribute it and/or modify 00008 * it under the terms of the GNU General Public License as published by 00009 * the Free Software Foundation; either version 3, or (at your option) 00010 * any later version. 00011 * 00012 * GNU Radio is distributed in the hope that it will be useful, 00013 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00014 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00015 * GNU General Public License for more details. 00016 * 00017 * You should have received a copy of the GNU General Public License along 00018 * with this program; if not, write to the Free Software Foundation, Inc., 00019 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 00020 */ 00021 #ifndef INCLUDED_GCELL_GC_MBOX_H 00022 #define INCLUDED_GCELL_GC_MBOX_H 00023 00024 /* 00025 * The PPE and SPE exchange a few 32-bit messages via mailboxes. 00026 * All have a 4 bit opcode in the high bits. 00027 * 00028 * 3 2 1 00029 * 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 00030 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 00031 * | op | arg | 00032 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 00033 * 00034 */ 00035 00036 #define MK_MBOX_MSG(cmd, args) ((((cmd) & 0xf) << 28) | ((args) & 0x0fffffff)) 00037 #define MBOX_MSG_OP(msg) (((msg) >> 28) & 0xf) 00038 #define MBOX_MSG_ARG(msg) ((msg) & 0x0fffffff) 00039 00040 // PPE to SPE (sent via SPE Read Inbound Mailbox) 00041 00042 #define OP_EXIT 0x0 // exit now 00043 #define OP_GET_SPU_BUFSIZE 0x1 00044 #define OP_CHECK_QUEUE 0x2 00045 00046 // SPE to PPE (sent via SPE Write Outbound Interrupt Mailbox) 00047 00048 #define OP_JOBS_DONE 0x3 // arg is 0 or 1, indicating which 00049 // gc_completion_info_t contains the info 00050 #define OP_SPU_BUFSIZE 0x4 // arg is max number of bytes 00051 00052 00053 #endif /* INCLUDED_GCELL_GC_MBOX_H */