Eric | 135d64b | 2023-04-21 13:59:56 +0200 | [diff] [blame] | 1 | #pragma once |
| 2 | /* |
| 3 | * (C) 2023 by sysmocom s.f.m.c. GmbH <info@sysmocom.de> |
| 4 | * All Rights Reserved |
| 5 | * |
| 6 | * Author: Eric Wild <ewild@sysmocom.de> |
| 7 | * |
| 8 | * This program is free software; you can redistribute it and/or modify |
| 9 | * it under the terms of the GNU Affero General Public License as published by |
| 10 | * the Free Software Foundation; either version 3 of the License, or |
| 11 | * (at your option) any later version. |
| 12 | * |
| 13 | * This program is distributed in the hope that it will be useful, |
| 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 16 | * GNU Affero General Public License for more details. |
| 17 | * |
| 18 | * You should have received a copy of the GNU Affero General Public License |
| 19 | * along with this program. If not, see <http://www.gnu.org/licenses/>. |
| 20 | * |
| 21 | */ |
| 22 | |
| 23 | #include "ms.h" |
| 24 | extern "C" { |
| 25 | #include <osmocom/bb/trxcon/phyif.h> |
| 26 | } |
| 27 | |
| 28 | extern struct trxcon_inst *g_trxcon; |
| 29 | struct internal_q_tx_buf { |
| 30 | trxcon_phyif_burst_req r; |
| 31 | uint8_t buf[148]; |
| 32 | internal_q_tx_buf() = default; |
| 33 | internal_q_tx_buf(const internal_q_tx_buf &) = delete; |
| 34 | internal_q_tx_buf &operator=(const internal_q_tx_buf &) = default; |
| 35 | internal_q_tx_buf(const struct trxcon_phyif_burst_req *br) : r(*br) |
| 36 | { |
| 37 | memcpy(buf, (void *)br->burst, br->burst_len); |
| 38 | } |
| 39 | }; |
Eric Wild | aa820c2 | 2024-03-18 20:31:06 +0100 | [diff] [blame] | 40 | using tx_queue_t = spsc_cond_timeout<8 * 1, internal_q_tx_buf, true, false>; |
Eric | d372eb2 | 2023-08-29 23:23:24 +0200 | [diff] [blame] | 41 | using cmd_queue_t = spsc_cond_timeout<8 * 1, trxcon_phyif_cmd, true, false>; |
Eric Wild | aa820c2 | 2024-03-18 20:31:06 +0100 | [diff] [blame] | 42 | using cmdr_queue_t = spsc_cond_timeout<8 * 1, trxcon_phyif_rsp, false, false>; |