NinjaFlight
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
unittest_macros.h
Go to the documentation of this file.
1 /*
2  * This file is part of Ninjaflight.
3  *
4  * Ninjaflight is free software: you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License as published by
6  * the Free Software Foundation, either version 3 of the License, or
7  * (at your option) any later version.
8  *
9  * Ninjaflight is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with Ninjaflight. If not, see <http://www.gnu.org/licenses/>.
16  */
17 
18 #pragma once
19 
30 #include "rx/rx.h"
31 
32 extern uint16_t mock_motor_pwm[8];
33 extern uint16_t mock_servo_pwm[8];
35 extern uint16_t mock_pwm_errors;
36 extern int16_t mock_acc[3];
37 extern int16_t mock_gyro[3];
38 extern uint32_t mock_eeprom_written;
39 extern uint16_t mock_eeprom_pages;
40 extern uint16_t mock_eeprom_page_size;
41 extern uint8_t mock_eeprom_erase_byte;
42 extern char mock_eeprom_data[];
43 
44 struct system_calls;
45 const struct system_calls *mock_syscalls();
46 void mock_system_reset();
47 void mock_eeprom_erase();
48 
49 #define UNUSED(x) (void)(x)
const struct system_calls * mock_syscalls()
Definition: mock_system.cc:199
int16_t mock_acc[3]
Definition: mock_system.cc:33
uint32_t mock_eeprom_written
Definition: mock_system.cc:35
uint8_t mock_eeprom_erase_byte
Definition: mock_system.cc:38
void mock_eeprom_erase()
Definition: mock_system.cc:210
uint16_t mock_servo_pwm[8]
Definition: mock_system.cc:30
uint16_t mock_rc_pwm[RX_MAX_SUPPORTED_RC_CHANNELS]
Definition: mock_system.cc:31
uint16_t mock_pwm_errors
Definition: mock_system.cc:32
uint16_t mock_eeprom_pages
Definition: mock_system.cc:36
uint16_t mock_eeprom_page_size
Definition: mock_system.cc:37
int16_t mock_gyro[3]
Definition: mock_system.cc:34
char mock_eeprom_data[]
Definition: mock_system.cc:42
void mock_system_reset()
Definition: mock_system.cc:214
#define RX_MAX_SUPPORTED_RC_CHANNELS
maximum supported channels when calling rx_get_channel
Definition: rx.h:27
Definition: system_calls.h:200
uint16_t mock_motor_pwm[8]
Definition: mock_system.cc:29