Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • avn/swd/skyward-boardcore
  • emilio.corigliano/skyward-boardcore
  • nicolo.caruso/skyward-boardcore
  • ettore.pane/skyward-boardcore
  • giulia.facchi/skyward-boardcore
  • valerio.flamminii/skyward-boardcore
6 results
Show changes
Commits on Source (23)
Showing
with 161 additions and 111 deletions
{
BasedOnStyle: Google,
AccessModifierOffset: -4,
AlignConsecutiveAssignments: true,
AllowShortIfStatementsOnASingleLine: false,
AllowShortLoopsOnASingleLine: false,
BreakBeforeBraces: Allman,
ColumnLimit: 80,
ConstructorInitializerAllOnOneLineOrOnePerLine: false,
IndentCaseLabels: true,
IndentWidth: 4,
KeepEmptyLinesAtTheStartOfBlocks: true,
}
BasedOnStyle: Google
ColumnLimit: 80
IndentWidth: 4
AccessModifierOffset: -4
BreakBeforeBraces: Allman
# Allow braceless single line if/else/for/while statements
RemoveBracesLLVM: true
AlignConsecutiveAssignments: Consecutive
AllowShortIfStatementsOnASingleLine: false
AllowShortLoopsOnASingleLine: false
PackConstructorInitializers: BinPack
IndentCaseLabels: true
# Empty lines behavior
InsertNewlineAtEOF: true
KeepEmptyLinesAtEOF: true
KeepEmptyLinesAtTheStartOfBlocks: false
# Align pointers/references to the type, not the variable
DerivePointerAlignment: false
PointerAlignment: Left
......@@ -23,7 +23,7 @@ variables:
GIT_SUBMODULE_STRATEGY: recursive
default:
image: registry.skywarder.eu/avn/swd/docker/miosix:latest
image: registry.skywarder.eu/avn/swd/docker/miosix:v2
stages:
- lint
......
......@@ -571,6 +571,29 @@
"${workspaceFolder}/libs/miosix-kernel/miosix/arch/cortexM7_stm32f7/stm32f769ni_discovery",
"${workspaceFolder}/libs/miosix-kernel/miosix/config/arch/cortexM7_stm32f7/stm32f769ni_discovery"
]
},
{
"name": "stm32f429zi_lyra_cubesat",
"cStandard": "c11",
"cppStandard": "c++14",
"compilerPath": "/opt/arm-miosix-eabi/bin/arm-miosix-eabi-g++",
"defines": [
"${defaultDefines}",
"_MIOSIX_BOARDNAME=stm32f429zi_lyra_cubesat",
"_BOARD_STM32F429ZI_LYRA_CUBESAT",
"_ARCH_CORTEXM4_STM32F4",
"STM32F429xx",
"HSE_VALUE=8000000",
"SYSCLK_FREQ_168MHz=168000000",
"__ENABLE_XRAM",
"V_DDA_VOLTAGE=3.3f"
],
"includePath": [
"${defaultIncludePaths}",
"${workspaceFolder}/libs/miosix-kernel/miosix/arch/cortexM4_stm32f4/common",
"${workspaceFolder}/src/bsps/stm32f429zi_lyra_cubesat/config",
"${workspaceFolder}/src/bsps/stm32f429zi_lyra_cubesat"
]
}
],
"version": 4
......
......@@ -21,13 +21,13 @@
cmake_minimum_required(VERSION 3.25)
enable_testing()
include(cmake/sbs.cmake)
#-----------------------------------------------------------------------------#
# Project #
#-----------------------------------------------------------------------------#
project(Boardcore)
include(cmake/sbs.cmake)
#-----------------------------------------------------------------------------#
# Entrypoints #
......
......@@ -29,11 +29,17 @@ The project is built with the CMake build system. We also have our own script th
### Dependencies
The following are required to build the project:
* `CMake` 3.25
* `Git`
* `Miosix` Toolchain
We also recommend to install `Ccache`, `Ninja`, `OpenOCD`, `Cppcheck`,`ClangFormat` and `pre-commit` for a smoother development experience.
You will also need the following tools for linting and formatting:
* `Python3`
* `Cppcheck 2.7`
* `ClangFormat 18`
We also recommend to install `Ccache`, `Ninja`, `OpenOCD`, and `pre-commit` for a smoother development experience.
### Cloning the repo
......
......@@ -41,4 +41,5 @@ set(BOARDCORE_BOARDS_OPTIONS_FILES
${BOARDCORE_PATH}/src/bsps/stm32f767zi_lyra_biscotto/config/board_options.cmake
${BOARDCORE_PATH}/src/bsps/stm32f767zi_lyra_motor/config/board_options.cmake
${BOARDCORE_PATH}/src/bsps/stm32f767zi_lyra_gs/config/board_options.cmake
${BOARDCORE_PATH}/src/bsps/stm32f429zi_lyra_cubesat/config/board_options.cmake
)
......@@ -21,6 +21,9 @@
enable_language(C CXX ASM)
set(CMAKE_CXX_STANDARD 14)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
# Load in SBS_BASE the project path
cmake_path(GET CMAKE_CURRENT_LIST_DIR PARENT_PATH SBS_BASE)
......
......@@ -58,6 +58,13 @@ VERBOSE_FILENAME=".sbs_verbose"
BUILD_DEFAULT_DIRNAME="build"
BUILD_HOST_DIRNAME="build-host"
# Logical cores count, cross platform
N_PROC=$(
nproc 2>/dev/null || # Linux
sysctl -n hw.logicalcpu 2>/dev/null || # macOS
getconf _NPROCESSORS_ONLN 2>/dev/null # POSIX
)
################################################################################
############################## Global States ##############################
################################################################################
......@@ -378,7 +385,7 @@ build_impl() {
declare opts
get_build_opts opts $jobs
cmake --build "$build_dir" "${opts[@]}" --target "$target"
cmake --build "$build_dir" --target "$target" "${opts[@]}"
}
flash_impl() {
......@@ -465,7 +472,7 @@ lint_clangformat() {
# count files and spread them evenly across cores: files / nproc + 1
declare files_per_proc=$(
echo "$files" | wc -l | \
xargs -I {} bash -c "expr \( {} / $(nproc) \) + 1"
xargs -I {} bash -c "expr \( {} / $N_PROC \) + 1"
)
echo "$files" | xargs -n $files_per_proc -P 0 clang-format "${opts[@]}"
......@@ -750,7 +757,7 @@ format() {
# count files and spread them evenly across cores: files / nproc + 1
declare files_per_proc=$(
echo "$files" | wc -l | \
xargs -I {} bash -c "expr \( {} / $(nproc) \) + 1"
xargs -I {} bash -c "expr \( {} / $N_PROC \) + 1"
)
echo "$files" | xargs -n $files_per_proc -P 0 clang-format "${opts[@]}"
......
......@@ -27,8 +27,8 @@
// The PARSING_FROM_IDE is because Netbeans gets confused by this, it is never
// defined when compiling the code.
#ifndef PARSING_FROM_IDE
//#error This error is a reminder that you have not edited miosix_settings.h
// yet.
// #error This error is a reminder that you have not edited miosix_settings.h
// yet.
#endif // PARSING_FROM_IDE
/**
......
......@@ -54,11 +54,11 @@ void program_startup()
extern unsigned char _bss_end asm("_bss_end");
// Initialize .data section, clear .bss section
unsigned char *etext = &_etext;
unsigned char *data = &_data;
unsigned char *edata = &_edata;
unsigned char *bss_start = &_bss_start;
unsigned char *bss_end = &_bss_end;
unsigned char* etext = &_etext;
unsigned char* data = &_data;
unsigned char* edata = &_edata;
unsigned char* bss_start = &_bss_start;
unsigned char* bss_end = &_bss_end;
// The memcpy is usually enclosed in an #ifndef __ENABLE_XRAM, in other
// boards but in this case it is not, since the *_code_in_xram.ld linker
// script puts code in XRAM, but data in the internal one, so there's still
......
......@@ -67,42 +67,41 @@ void IRQbspInit()
GPIOD->OSPEEDR = 0xaaaaaaaa;
using namespace interfaces;
spi1::cs::mode(Mode::OUTPUT);
spi1::cs::high();
spi1::sck::mode(Mode::ALTERNATE);
spi1::sck::alternateFunction(5);
spi1::miso::mode(Mode::ALTERNATE);
spi1::sck::mode(Mode::ALTERNATE);
spi1::miso::alternateFunction(5);
spi1::mosi::mode(Mode::ALTERNATE);
spi1::miso::mode(Mode::ALTERNATE);
spi1::mosi::alternateFunction(5);
spi1::mosi::mode(Mode::ALTERNATE);
spi2::sck::mode(Mode::ALTERNATE);
spi2::sck::alternateFunction(5);
spi2::miso::mode(Mode::ALTERNATE);
spi2::sck::mode(Mode::ALTERNATE);
spi2::miso::alternateFunction(5);
spi2::mosi::mode(Mode::ALTERNATE);
spi2::miso::mode(Mode::ALTERNATE);
spi2::mosi::alternateFunction(5);
spi2::mosi::mode(Mode::ALTERNATE);
usart1::rx::mode(Mode::ALTERNATE);
usart1::rx::alternateFunction(7);
usart1::tx::mode(Mode::ALTERNATE);
usart1::rx::mode(Mode::ALTERNATE);
usart1::tx::alternateFunction(7);
usart1::tx::mode(Mode::ALTERNATE);
usart2::rx::mode(Mode::ALTERNATE);
usart2::rx::alternateFunction(7);
usart2::tx::mode(Mode::ALTERNATE);
usart2::rx::mode(Mode::ALTERNATE);
usart2::tx::alternateFunction(7);
usart2::tx::mode(Mode::ALTERNATE);
usart3::rx::mode(Mode::ALTERNATE);
usart3::rx::alternateFunction(7);
usart3::tx::mode(Mode::ALTERNATE);
usart3::rx::mode(Mode::ALTERNATE);
usart3::tx::alternateFunction(7);
usart3::tx::mode(Mode::ALTERNATE);
can1::rx::mode(Mode::ALTERNATE);
can1::rx::alternateFunction(9);
can1::tx::mode(Mode::ALTERNATE);
can1::rx::mode(Mode::ALTERNATE);
can1::tx::alternateFunction(9);
can1::tx::mode(Mode::ALTERNATE);
using namespace devices;
......@@ -124,8 +123,8 @@ void IRQbspInit()
buttons::bypass::mode(Mode::INPUT);
buttons::record::mode(Mode::INPUT);
buzzer::drive::mode(Mode::ALTERNATE);
buzzer::drive::alternateFunction(3);
buzzer::drive::mode(Mode::ALTERNATE);
leds::led1::mode(Mode::OUTPUT);
leds::led1::low();
......
......@@ -27,8 +27,8 @@
// The PARSING_FROM_IDE is because Netbeans gets confused by this, it is never
// defined when compiling the code.
#ifndef PARSING_FROM_IDE
//#error This error is a reminder that you have not edited miosix_settings.h
// yet.
// #error This error is a reminder that you have not edited miosix_settings.h
// yet.
#endif // PARSING_FROM_IDE
/**
......@@ -70,14 +70,14 @@ namespace miosix
// Uncomment only *one* of those
#define SCHED_TYPE_PRIORITY
//#define SCHED_TYPE_CONTROL_BASED
//#define SCHED_TYPE_EDF
// #define SCHED_TYPE_CONTROL_BASED
// #define SCHED_TYPE_EDF
/// \def WITH_CPU_TIME_COUNTER
/// Allows to enable/disable CPUTimeCounter to save code size and remove its
/// overhead from the scheduling process. By default it is not defined
/// (CPUTimeCounter is disabled).
//#define WITH_CPU_TIME_COUNTER
// #define WITH_CPU_TIME_COUNTER
//
// Filesystem options
......@@ -110,7 +110,7 @@ const unsigned char MAX_OPEN_FILES = 8;
/// This enables the dynamic loader to load elf programs, the extended system
/// call service and, if the hardware supports it, the MPU to provide memory
/// isolation of processes
//#define WITH_PROCESSES
// #define WITH_PROCESSES
#if defined(WITH_PROCESSES) && defined(__NO_EXCEPTIONS)
#error Processes require C++ exception support
......@@ -145,7 +145,7 @@ const unsigned char MAX_OPEN_FILES = 8;
/// \def WITH_DEEP_SLEEP
/// Adds interfaces and required variables to support deep sleep state switch
/// automatically when peripherals are not required
//#define WITH_DEEP_SLEEP
// #define WITH_DEEP_SLEEP
/**
* \def JTAG_DISABLE_SLEEP
......
......@@ -55,11 +55,11 @@ void program_startup()
extern unsigned char _bss_end asm("_bss_end");
// Initialize .data section, clear .bss section
unsigned char *etext = &_etext;
unsigned char *data = &_data;
unsigned char *edata = &_edata;
unsigned char *bss_start = &_bss_start;
unsigned char *bss_end = &_bss_end;
unsigned char* etext = &_etext;
unsigned char* data = &_data;
unsigned char* edata = &_edata;
unsigned char* bss_start = &_bss_start;
unsigned char* bss_end = &_bss_end;
memcpy(data, etext, edata - data);
memset(bss_start, 0, bss_end - bss_start);
......
......@@ -213,12 +213,12 @@ void IRQbspInit()
RCC_SYNC();
// Initialize everything
interfaces::spi1::sck::mode(Mode::ALTERNATE);
interfaces::spi1::sck::alternateFunction(5);
interfaces::spi1::miso::mode(Mode::ALTERNATE);
interfaces::spi1::sck::mode(Mode::ALTERNATE);
interfaces::spi1::miso::alternateFunction(5);
interfaces::spi1::mosi::mode(Mode::ALTERNATE);
interfaces::spi1::miso::mode(Mode::ALTERNATE);
interfaces::spi1::mosi::alternateFunction(5);
interfaces::spi1::mosi::mode(Mode::ALTERNATE);
btns::n2o_filling::mode(Mode::INPUT);
btns::n2o_release::mode(Mode::INPUT);
......
......@@ -27,8 +27,8 @@
// The PARSING_FROM_IDE is because Netbeans gets confused by this, it is never
// defined when compiling the code.
#ifndef PARSING_FROM_IDE
//#error This error is a reminder that you have not edited miosix_settings.h
// yet.
// #error This error is a reminder that you have not edited miosix_settings.h
// yet.
#endif // PARSING_FROM_IDE
/**
......@@ -70,14 +70,14 @@ namespace miosix
// Uncomment only *one* of those
#define SCHED_TYPE_PRIORITY
//#define SCHED_TYPE_CONTROL_BASED
//#define SCHED_TYPE_EDF
// #define SCHED_TYPE_CONTROL_BASED
// #define SCHED_TYPE_EDF
/// \def WITH_CPU_TIME_COUNTER
/// Allows to enable/disable CPUTimeCounter to save code size and remove its
/// overhead from the scheduling process. By default it is not defined
/// (CPUTimeCounter is disabled).
//#define WITH_CPU_TIME_COUNTER
// #define WITH_CPU_TIME_COUNTER
//
// Filesystem options
......@@ -110,7 +110,7 @@ const unsigned char MAX_OPEN_FILES = 8;
/// This enables the dynamic loader to load elf programs, the extended system
/// call service and, if the hardware supports it, the MPU to provide memory
/// isolation of processes
//#define WITH_PROCESSES
// #define WITH_PROCESSES
#if defined(WITH_PROCESSES) && defined(__NO_EXCEPTIONS)
#error Processes require C++ exception support
......@@ -145,7 +145,7 @@ const unsigned char MAX_OPEN_FILES = 8;
/// \def WITH_DEEP_SLEEP
/// Adds interfaces and required variables to support deep sleep state switch
/// automatically when peripherals are not required
//#define WITH_DEEP_SLEEP
// #define WITH_DEEP_SLEEP
/**
* \def JTAG_DISABLE_SLEEP
......
......@@ -55,11 +55,11 @@ void program_startup()
extern unsigned char _bss_end asm("_bss_end");
// Initialize .data section, clear .bss section
unsigned char *etext = &_etext;
unsigned char *data = &_data;
unsigned char *edata = &_edata;
unsigned char *bss_start = &_bss_start;
unsigned char *bss_end = &_bss_end;
unsigned char* etext = &_etext;
unsigned char* data = &_data;
unsigned char* edata = &_edata;
unsigned char* bss_start = &_bss_start;
unsigned char* bss_end = &_bss_end;
memcpy(data, etext, edata - data);
memset(bss_start, 0, bss_end - bss_start);
......
......@@ -327,19 +327,19 @@ void IRQbspInit()
#endif //__ENABLE_XRAM
using namespace interfaces;
spi1::sck::mode(Mode::ALTERNATE);
spi1::sck::alternateFunction(5);
spi1::miso::mode(Mode::ALTERNATE);
spi1::sck::mode(Mode::ALTERNATE);
spi1::miso::alternateFunction(5);
spi1::mosi::mode(Mode::ALTERNATE);
spi1::miso::mode(Mode::ALTERNATE);
spi1::mosi::alternateFunction(5);
spi1::mosi::mode(Mode::ALTERNATE);
spi2::sck::mode(Mode::ALTERNATE);
spi2::sck::alternateFunction(5);
spi2::miso::mode(Mode::ALTERNATE);
spi2::sck::mode(Mode::ALTERNATE);
spi2::miso::alternateFunction(5);
spi2::mosi::mode(Mode::ALTERNATE);
spi2::miso::mode(Mode::ALTERNATE);
spi2::mosi::alternateFunction(5);
spi2::mosi::mode(Mode::ALTERNATE);
// Software I2C
i2c::scl::high();
......@@ -347,21 +347,21 @@ void IRQbspInit()
i2c::sda::high();
i2c::sda::mode(Mode::OPEN_DRAIN);
uart4::rx::mode(Mode::ALTERNATE);
uart4::rx::alternateFunction(8);
uart4::tx::mode(Mode::ALTERNATE);
uart4::rx::mode(Mode::ALTERNATE);
uart4::tx::alternateFunction(8);
uart4::tx::mode(Mode::ALTERNATE);
can::rx::mode(Mode::ALTERNATE);
can::rx::alternateFunction(9);
can::tx::mode(Mode::ALTERNATE);
can::rx::mode(Mode::ALTERNATE);
can::tx::alternateFunction(9);
can::tx::mode(Mode::ALTERNATE);
using namespace sensors;
adis16405::cs::mode(Mode::OUTPUT);
adis16405::cs::high();
adis16405::ckIn::mode(Mode::ALTERNATE);
adis16405::ckIn::alternateFunction(2);
adis16405::ckIn::mode(Mode::ALTERNATE);
adis16405::dio1::mode(Mode::INPUT);
adis16405::rst::mode(Mode::OUTPUT);
adis16405::rst::high();
......@@ -396,11 +396,11 @@ void IRQbspInit()
motP2::mode(Mode::OUTPUT);
motP2::low();
rogP1::mode(Mode::ALTERNATE);
rogP1::alternateFunction(2);
rogP1::mode(Mode::ALTERNATE);
rogP2::mode(Mode::ALTERNATE);
rogP2::alternateFunction(2);
rogP2::mode(Mode::ALTERNATE);
nc_dtch::mode(Mode::INPUT);
motor_act::mode(Mode::INPUT);
......@@ -412,8 +412,8 @@ void IRQbspInit()
motor_gnd::low();
using namespace actuators;
tcPwm::mode(Mode::ALTERNATE);
tcPwm::alternateFunction(3);
tcPwm::mode(Mode::ALTERNATE);
thCut1::ena::mode(Mode::OUTPUT);
thCut1::ena::low();
......
......@@ -27,8 +27,8 @@
// The PARSING_FROM_IDE is because Netbeans gets confused by this, it is never
// defined when compiling the code.
#ifndef PARSING_FROM_IDE
//#error This error is a reminder that you have not edited miosix_settings.h
// yet.
// #error This error is a reminder that you have not edited miosix_settings.h
// yet.
#endif // PARSING_FROM_IDE
/**
......@@ -70,14 +70,14 @@ namespace miosix
// Uncomment only *one* of those
#define SCHED_TYPE_PRIORITY
//#define SCHED_TYPE_CONTROL_BASED
//#define SCHED_TYPE_EDF
// #define SCHED_TYPE_CONTROL_BASED
// #define SCHED_TYPE_EDF
/// \def WITH_CPU_TIME_COUNTER
/// Allows to enable/disable CPUTimeCounter to save code size and remove its
/// overhead from the scheduling process. By default it is not defined
/// (CPUTimeCounter is disabled).
//#define WITH_CPU_TIME_COUNTER
// #define WITH_CPU_TIME_COUNTER
//
// Filesystem options
......@@ -110,7 +110,7 @@ const unsigned char MAX_OPEN_FILES = 8;
/// This enables the dynamic loader to load elf programs, the extended system
/// call service and, if the hardware supports it, the MPU to provide memory
/// isolation of processes
//#define WITH_PROCESSES
// #define WITH_PROCESSES
#if defined(WITH_PROCESSES) && defined(__NO_EXCEPTIONS)
#error Processes require C++ exception support
......@@ -145,7 +145,7 @@ const unsigned char MAX_OPEN_FILES = 8;
/// \def WITH_DEEP_SLEEP
/// Adds interfaces and required variables to support deep sleep state switch
/// automatically when peripherals are not required
//#define WITH_DEEP_SLEEP
// #define WITH_DEEP_SLEEP
/**
* \def JTAG_DISABLE_SLEEP
......
......@@ -55,11 +55,11 @@ void program_startup()
extern unsigned char _bss_end asm("_bss_end");
// Initialize .data section, clear .bss section
unsigned char *etext = &_etext;
unsigned char *data = &_data;
unsigned char *edata = &_edata;
unsigned char *bss_start = &_bss_start;
unsigned char *bss_end = &_bss_end;
unsigned char* etext = &_etext;
unsigned char* data = &_data;
unsigned char* edata = &_edata;
unsigned char* bss_start = &_bss_start;
unsigned char* bss_end = &_bss_end;
memcpy(data, etext, edata - data);
memset(bss_start, 0, bss_end - bss_start);
......
......@@ -337,44 +337,44 @@ void IRQbspInit()
using namespace interfaces;
spi1::sck::mode(Mode::ALTERNATE);
spi1::sck::alternateFunction(5);
spi1::miso::mode(Mode::ALTERNATE);
spi1::sck::mode(Mode::ALTERNATE);
spi1::miso::alternateFunction(5);
spi1::mosi::mode(Mode::ALTERNATE);
spi1::miso::mode(Mode::ALTERNATE);
spi1::mosi::alternateFunction(5);
spi1::mosi::mode(Mode::ALTERNATE);
spi2::sck::mode(Mode::ALTERNATE);
spi2::sck::alternateFunction(5);
spi2::miso::mode(Mode::ALTERNATE);
spi2::sck::mode(Mode::ALTERNATE);
spi2::miso::alternateFunction(5);
spi2::mosi::mode(Mode::ALTERNATE);
spi2::miso::mode(Mode::ALTERNATE);
spi2::mosi::alternateFunction(5);
spi2::mosi::mode(Mode::ALTERNATE);
uart2::rx::mode(Mode::ALTERNATE);
uart2::rx::alternateFunction(7);
uart2::tx::mode(Mode::ALTERNATE);
uart2::rx::mode(Mode::ALTERNATE);
uart2::tx::alternateFunction(7);
uart2::tx::mode(Mode::ALTERNATE);
uart3::rx::mode(Mode::ALTERNATE);
uart3::rx::alternateFunction(7);
uart3::tx::mode(Mode::ALTERNATE);
uart3::rx::mode(Mode::ALTERNATE);
uart3::tx::alternateFunction(7);
uart3::tx::mode(Mode::ALTERNATE);
uart4::rx::mode(Mode::ALTERNATE);
uart4::rx::alternateFunction(8);
uart4::tx::mode(Mode::ALTERNATE);
uart4::rx::mode(Mode::ALTERNATE);
uart4::tx::alternateFunction(8);
uart4::tx::mode(Mode::ALTERNATE);
can::rx::mode(Mode::ALTERNATE);
can::rx::alternateFunction(9);
can::tx::mode(Mode::ALTERNATE);
can::rx::mode(Mode::ALTERNATE);
can::tx::alternateFunction(9);
can::tx::mode(Mode::ALTERNATE);
timers::tim4ch1::mode(Mode::ALTERNATE);
timers::tim4ch1::alternateFunction(2);
timers::tim8ch2::mode(Mode::ALTERNATE);
timers::tim4ch1::mode(Mode::ALTERNATE);
timers::tim8ch2::alternateFunction(3);
timers::tim8ch2::mode(Mode::ALTERNATE);
camMosfet::mode(Mode::OUTPUT);
camMosfet::low();
......