| 1 | #include "Types.h" |
| 2 | #include "AdcConductor.h" |
| 3 | #include "AdcModel.h" |
| 4 | #include "AdcHardware.h" |
| 5 | |
| 6 | void AdcConductor_Init(void) |
| 7 | { |
| 8 | AdcHardware_Init(); |
| 9 | } |
| 10 | |
| 11 | void AdcConductor_Run(void) |
| 12 | { |
| 13 | if (AdcModel_DoGetSample() && AdcHardware_GetSampleComplete()) |
| 14 | { |
| 15 | AdcModel_ProcessInput(AdcHardware_GetSample()); |
| 16 | AdcHardware_StartConversion(); |
| 17 | } |
| 18 | } |
| 19 | |
| 20 | bool AdcConductor_JustHereToTest(void) |
| 21 | { |
| 22 | EXAMPLE_STRUCT_T ExampleStruct; |
| 23 | ExampleStruct.x = 5; |
| 24 | ExampleStruct.y = 7; |
| 25 | |
| 26 | return AdcModel_DoNothingExceptTestASpecialType(ExampleStruct); |
| 27 | } |
| 28 | |
| 29 | bool AdcConductor_AlsoHereToTest(void) |
| 30 | { |
| 31 | EXAMPLE_STRUCT_T example = AdcModel_DoNothingExceptReturnASpecialType(); |
| 32 | |
| 33 | return ((example.x == 99) && (example.y == 1)); |
| 34 | } |
| 35 | |
| 36 | bool AdcConductor_YetAnotherTest(void) |
| 37 | { |
| 38 | uint32 example = 3; |
| 39 | |
| 40 | return AdModel_DoNothingExceptTestPointers(&example); |
| 41 | } |
| 42 |