mirror of
https://github.com/saymrwulf/uhd.git
synced 2026-05-14 20:58:09 +00:00
Modify files for treatment with clang-format
Some files in the source tree need some treatment before clang-format can automatically be applied to all files. This commit adds some 'clang-format off' statements and some manual pre-formatting in order to not cause havoc when clang-format is applied to the entire source tree.
This commit is contained in:
parent
b3541dd6d9
commit
030678a7f6
9 changed files with 45670 additions and 45659 deletions
|
|
@ -1,14 +1,17 @@
|
|||
{autogen_msg}
|
||||
|
||||
#include "{lvbitx_classname}_lvbitx.hpp"
|
||||
#include <string>
|
||||
#include <iostream>
|
||||
#include <fstream>
|
||||
#include <streambuf>
|
||||
#include <boost/filesystem/path.hpp>
|
||||
#include <boost/algorithm/string.hpp>
|
||||
#include <regex>
|
||||
#include <uhd/utils/paths.hpp>
|
||||
#include <boost/algorithm/string.hpp>
|
||||
#include <boost/filesystem/path.hpp>
|
||||
#include <fstream>
|
||||
#include <iostream>
|
||||
#include <regex>
|
||||
#include <streambuf>
|
||||
#include <string>
|
||||
|
||||
// This is a template, so clang-format needs to ignore this file
|
||||
// clang-format off
|
||||
|
||||
namespace uhd {{ namespace niusrprio {{
|
||||
|
||||
|
|
@ -86,3 +89,4 @@ void {lvbitx_classname}_lvbitx::init_fifo_info(nirio_fifo_info_vtr& vtr) {{ {fif
|
|||
}}
|
||||
|
||||
}}}}
|
||||
// clang-format on
|
||||
|
|
|
|||
|
|
@ -1,7 +1,8 @@
|
|||
// This is a template, so clang-format needs to ignore this file
|
||||
// clang-format off
|
||||
{autogen_msg}
|
||||
|
||||
#ifndef INCLUDED_{lvbitx_classname_u}_LVBITX_HPP
|
||||
#define INCLUDED_{lvbitx_classname_u}_LVBITX_HPP
|
||||
#pragma once
|
||||
|
||||
#include <uhd/transport/nirio/nifpga_lvbitx.h>
|
||||
|
||||
|
|
@ -29,8 +30,8 @@ public:
|
|||
virtual size_t get_indicator_count();
|
||||
virtual const char** get_indicator_names();
|
||||
|
||||
virtual void init_register_info(nirio_register_info_vtr& vtr);
|
||||
virtual void init_fifo_info(nirio_fifo_info_vtr& vtr);
|
||||
virtual void init_register_info(nirio_register_info_vtr & vtr);
|
||||
virtual void init_fifo_info(nirio_fifo_info_vtr & vtr);
|
||||
|
||||
static const char* CONTROLS[];
|
||||
static const char* INDICATORS[];
|
||||
|
|
@ -43,6 +44,3 @@ private:
|
|||
}};
|
||||
|
||||
}}}}
|
||||
|
||||
#endif /* INCLUDED_{lvbitx_classname_u}_LVBITX_HPP */
|
||||
|
||||
|
|
|
|||
|
|
@ -48,6 +48,7 @@ static uint16_t lte10mhz_tx_coeffs[] = {
|
|||
};
|
||||
*/
|
||||
|
||||
/* clang-format off */
|
||||
/************************************************************/
|
||||
/* These filters suitable for decimation/interpolation by 2 */
|
||||
/************************************************************/
|
||||
|
|
@ -107,5 +108,6 @@ static int16_t fir_48_x4_coeffs[] = {
|
|||
12736,7555,2230,-1580,-3073,-2508,-887,647,1358,1149,419,-287,-609,-508,-183,114,237,191,68,-39,-84,-74,-32};
|
||||
|
||||
/* NOTE: To write coeffs directly from Octave in a format that's useful in C use: dlmwrite ("file.csv",bb,","); */
|
||||
/* clang-format on */
|
||||
|
||||
#endif // INCLUDED_AD9361_FILTER_TAPS_HPP
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@ cdecoder.c - c source to a base64 decoding algorithm implementation
|
|||
This is part of the libb64 project, and has been placed in the public domain.
|
||||
For details, see http://sourceforge.net/projects/libb64
|
||||
*/
|
||||
/* clang-format off */
|
||||
|
||||
#include "cdecode.h"
|
||||
|
||||
|
|
@ -87,3 +88,4 @@ size_t base64_decode_block(const char* code_in, const size_t length_in, char* pl
|
|||
/* control should not reach here */
|
||||
return plainchar - plaintext_out;
|
||||
}
|
||||
/* clang-format on */
|
||||
|
|
|
|||
|
|
@ -32,6 +32,7 @@ OUTPUT_HEADER_CPP = """//
|
|||
|
||||
#include <tuple>
|
||||
|
||||
// clang-format off
|
||||
"""
|
||||
|
||||
OUTPUT_HEADER_PYTHON = """#
|
||||
|
|
@ -72,7 +73,7 @@ while True:
|
|||
m = define_pat.match(line)
|
||||
if m:
|
||||
cpp_file.write("uint8_t {}[] = {{ // {}\n".format(m.group(1), m.group(2)))
|
||||
python_file.write("{} = bytes([ # {}\n".format(m.group(1), m.group(2)))
|
||||
python_file.write("{} = bytes([ # {}\n".format(m.group(1), m.group(2).strip()))
|
||||
var_sort_match = var_sort_pat.match(m.group(1))
|
||||
if var_sort_match:
|
||||
var_names_peer_0.append(m.group(1))
|
||||
|
|
@ -96,7 +97,7 @@ for peer_name, var_names in [("peer0", var_names_peer_0), ("peer1", var_names_pe
|
|||
python_file.write("{} = [\n\t".format(peer_name))
|
||||
|
||||
for var_name in var_names:
|
||||
cpp_file.write("\tstd::make_tuple({0}, sizeof({0})),\n".format(var_name))
|
||||
cpp_file.write(" std::make_tuple({0}, sizeof({0})),\n".format(var_name))
|
||||
cpp_file.write("};\n")
|
||||
|
||||
for i, var_name in enumerate(var_names):
|
||||
|
|
|
|||
|
|
@ -4,10 +4,10 @@
|
|||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
//
|
||||
|
||||
#include "chdr_resource/rfnoc_packets_ctrl_mgmt.cpp"
|
||||
#include "chdr_resource/rfnoc_packets_data.cpp"
|
||||
#include <uhd/rfnoc/chdr_types.hpp>
|
||||
#include <uhd/utils/chdr/chdr_packet.hpp>
|
||||
#include <chdr_resource/rfnoc_packets_ctrl_mgmt.cpp>
|
||||
#include <chdr_resource/rfnoc_packets_data.cpp>
|
||||
|
||||
namespace chdr_util = uhd::utils::chdr;
|
||||
namespace chdr_rfnoc = uhd::rfnoc::chdr;
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
|
|
@ -1,3 +1,4 @@
|
|||
/* clang-format off */
|
||||
unsigned const char b100_eeprom_bin[] = {
|
||||
0xc2, 0x00, 0x25, 0x02, 0x00, 0x04, 0x00, 0x00, 0x00, 0x7b, 0x00, 0x00,
|
||||
0x02, 0x00, 0x6b, 0x12, 0x00, 0x08, 0x80, 0xfe, 0x75, 0x80, 0x00, 0x75,
|
||||
|
|
@ -13,3 +14,4 @@ unsigned const char b100_eeprom_bin[] = {
|
|||
0x02, 0x00, 0x03, 0x80, 0x01, 0xe6, 0x00, 0x00
|
||||
};
|
||||
unsigned int b100_eeprom_bin_len = 140;
|
||||
/* clang-format on */
|
||||
|
|
|
|||
Loading…
Reference in a new issue