|
|
@ -7,6 +7,8 @@ |
|
|
|
#include "sdk/os/zos.hpp"
|
|
|
|
#include "sysmgr/sys_mgr.hpp"
|
|
|
|
//
|
|
|
|
#include "subboards/subboard20_plate_clamp_case/subboard20_plate_clamp_case.hpp"
|
|
|
|
#include "subboards/subboard20_plate_clamp_case/subboard20_plate_clamp_case_board.h"
|
|
|
|
#include "subboards/subboard30_shake_module/subboard30_shake_module.hpp"
|
|
|
|
#include "subboards/subboard30_shake_module/subboard30_shake_module_board.h"
|
|
|
|
#include "subboards/subboard60_inlet_and_outlet_module/subboard60_inlet_and_outlet_module.hpp"
|
|
|
@ -15,6 +17,8 @@ |
|
|
|
#include "subboards/subboard70_incubation_turntable/subboard70_incubation_turntable_board.h"
|
|
|
|
#include "subboards/subboard80_cliptip/subboard80_cliptip.hpp"
|
|
|
|
#include "subboards/subboard80_cliptip/subboard80_cliptip_board.h"
|
|
|
|
#include "subboards/subboard90_optical_module/subboard90_optical_module.hpp"
|
|
|
|
#include "subboards/subboard90_optical_module/subboard90_optical_module_board.h"
|
|
|
|
|
|
|
|
//
|
|
|
|
|
|
|
@ -31,22 +35,24 @@ int32_t deviceId = 0; |
|
|
|
|
|
|
|
static void board_init() { |
|
|
|
switch (deviceId) { |
|
|
|
case 20: // 板夹仓
|
|
|
|
subboard20_plate_clamp_case_board_init(); |
|
|
|
break; |
|
|
|
case 30: // 摇匀模组
|
|
|
|
subboard30_shake_module_board_init(); |
|
|
|
break; |
|
|
|
|
|
|
|
case 60: // 进出料模组
|
|
|
|
subboard60_inlet_and_outlet_module_board_init(); |
|
|
|
break; |
|
|
|
|
|
|
|
case 70: // 孵化转盘
|
|
|
|
subboard70_incubation_turntable_board_init(); |
|
|
|
break; |
|
|
|
|
|
|
|
case 80: |
|
|
|
subboard80_cliptip_board_init(); |
|
|
|
break; |
|
|
|
|
|
|
|
case 90: |
|
|
|
subboard90_optical_module_board_init(); |
|
|
|
break; |
|
|
|
default: |
|
|
|
common_hardware_init(); |
|
|
|
break; |
|
|
@ -56,6 +62,9 @@ static void board_init() { |
|
|
|
static void board_post_init() { |
|
|
|
GService::inst()->initialize(); |
|
|
|
switch (deviceId) { |
|
|
|
case 20: |
|
|
|
Subboard20PlateClampCase::ins()->initialize(); |
|
|
|
break; |
|
|
|
case 30: // 摇匀模组
|
|
|
|
Subboard30ShakeModule::ins()->initialize(); |
|
|
|
break; |
|
|
@ -68,7 +77,9 @@ static void board_post_init() { |
|
|
|
case 80: |
|
|
|
Subboard80Cliptip::ins()->initialize(); |
|
|
|
break; |
|
|
|
|
|
|
|
// case 90:
|
|
|
|
// Subboard90OpticalModule::ins()->initialize();
|
|
|
|
// break;
|
|
|
|
default: |
|
|
|
break; |
|
|
|
} |
|
|
@ -79,12 +90,17 @@ void umain() { |
|
|
|
|
|
|
|
board_init(); |
|
|
|
|
|
|
|
Pin_t debugLight = PC_DEBUG_LIGHT_GPIO; |
|
|
|
if (deviceId == 20) { |
|
|
|
debugLight = PC_SUBBOARD20_LIGHT_GPIO; |
|
|
|
} |
|
|
|
|
|
|
|
zos_cfg_t zoscfg = {0}; |
|
|
|
chip_cfg_t chipcfg = {}; |
|
|
|
chipcfg.us_dleay_tim = &PC_SYS_DELAY_US_TIMER; |
|
|
|
chipcfg.tim_irq_scheduler_tim = &PC_SYS_TIM_IRQ_SCHEDULER_TIMER; |
|
|
|
chipcfg.huart = &PC_DEBUG_UART; |
|
|
|
chipcfg.debuglight = PC_DEBUG_LIGHT_GPIO; |
|
|
|
chipcfg.debuglight = debugLight; |
|
|
|
|
|
|
|
chip_init(&chipcfg); |
|
|
|
zos_init(&zoscfg); |
|
|
|