[fix][examples] add while(1) when case fail
This commit is contained in:
parent
6ee666be9b
commit
5d9e51d889
@ -69,6 +69,8 @@ int main(void)
|
|||||||
if (SUCCESS != image_sensor_init(DISABLE, &camera_cfg, &mjpeg_cfg)) {
|
if (SUCCESS != image_sensor_init(DISABLE, &camera_cfg, &mjpeg_cfg)) {
|
||||||
MSG("Init error!\n");
|
MSG("Init error!\n");
|
||||||
BL_CASE_FAIL;
|
BL_CASE_FAIL;
|
||||||
|
while (1) {
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
cam_start();
|
cam_start();
|
||||||
|
@ -193,11 +193,12 @@ int ATTR_TCM_SECTION main(void)
|
|||||||
CAM_Int_Callback_set(CAM_INT_NORMAL_0, &CAM_Interrupt_Normal);
|
CAM_Int_Callback_set(CAM_INT_NORMAL_0, &CAM_Interrupt_Normal);
|
||||||
CAM_IntMask(CAM_INT_NORMAL_0, UNMASK);
|
CAM_IntMask(CAM_INT_NORMAL_0, UNMASK);
|
||||||
CPU_Interrupt_Enable(CAM_IRQn);
|
CPU_Interrupt_Enable(CAM_IRQn);
|
||||||
System_NVIC_SetPriority(CAM_IRQn, 4, 1);
|
|
||||||
|
|
||||||
if (SUCCESS != image_sensor_init(DISABLE, &camera_cfg, &mjpeg_cfg)) {
|
if (SUCCESS != image_sensor_init(DISABLE, &camera_cfg, &mjpeg_cfg)) {
|
||||||
MSG("Init error!\n");
|
MSG("Init error!\n");
|
||||||
BL_CASE_FAIL;
|
BL_CASE_FAIL;
|
||||||
|
while (1) {
|
||||||
|
}
|
||||||
}
|
}
|
||||||
// MSG("cam init!\n");
|
// MSG("cam init!\n");
|
||||||
cam_start();
|
cam_start();
|
||||||
|
@ -76,6 +76,8 @@ int main(void)
|
|||||||
if (SUCCESS != image_sensor_init(DISABLE, &camera_cfg, &mjpeg_cfg)) {
|
if (SUCCESS != image_sensor_init(DISABLE, &camera_cfg, &mjpeg_cfg)) {
|
||||||
MSG("Init error!\n");
|
MSG("Init error!\n");
|
||||||
BL_CASE_FAIL;
|
BL_CASE_FAIL;
|
||||||
|
while (1) {
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
cam_start();
|
cam_start();
|
||||||
|
@ -252,6 +252,8 @@ int main(void)
|
|||||||
if (SUCCESS != image_sensor_init(DISABLE, &camera_cfg, &mjpeg_cfg)) {
|
if (SUCCESS != image_sensor_init(DISABLE, &camera_cfg, &mjpeg_cfg)) {
|
||||||
MSG("Init error!\n");
|
MSG("Init error!\n");
|
||||||
BL_CASE_FAIL;
|
BL_CASE_FAIL;
|
||||||
|
while (1) {
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
cam_start();
|
cam_start();
|
||||||
|
@ -49,6 +49,8 @@ int main(void)
|
|||||||
for (i = 0; i < 256; i++) {
|
for (i = 0; i < 256; i++) {
|
||||||
if (readTestData[i] != i) {
|
if (readTestData[i] != i) {
|
||||||
BL_CASE_FAIL;
|
BL_CASE_FAIL;
|
||||||
|
while (1) {
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -96,6 +96,7 @@ uint8_t dht11_check(void)
|
|||||||
} else {
|
} else {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
uint8_t dht11_read_bit(void)
|
uint8_t dht11_read_bit(void)
|
||||||
@ -121,6 +122,7 @@ uint8_t dht11_read_bit(void)
|
|||||||
} else {
|
} else {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
uint8_t dht11_read_byte(void)
|
uint8_t dht11_read_byte(void)
|
||||||
@ -157,6 +159,7 @@ uint8_t dht11_read_data(uint8_t *temp, uint8_t *humi)
|
|||||||
} else {
|
} else {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
uint8_t dht11_init(void)
|
uint8_t dht11_init(void)
|
||||||
|
@ -179,6 +179,8 @@ int main(void)
|
|||||||
|
|
||||||
if (stat == ERROR) {
|
if (stat == ERROR) {
|
||||||
BL_CASE_FAIL;
|
BL_CASE_FAIL;
|
||||||
|
while (1) {
|
||||||
|
}
|
||||||
}
|
}
|
||||||
BL_CASE_SUCCESS;
|
BL_CASE_SUCCESS;
|
||||||
L1C_Cache_Hit_Count_Get(&hitCountLow, &hitCountHigh);
|
L1C_Cache_Hit_Count_Get(&hitCountLow, &hitCountHigh);
|
||||||
|
@ -264,6 +264,8 @@ int main(void)
|
|||||||
if (SUCCESS != image_sensor_init(ENABLE, &camera_cfg, &mjpeg_cfg)) {
|
if (SUCCESS != image_sensor_init(ENABLE, &camera_cfg, &mjpeg_cfg)) {
|
||||||
MSG("Camera Init error!\n");
|
MSG("Camera Init error!\n");
|
||||||
BL_CASE_FAIL;
|
BL_CASE_FAIL;
|
||||||
|
while (1) {
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
MSG("Camera Init success!\n");
|
MSG("Camera Init success!\n");
|
||||||
|
@ -322,6 +322,8 @@ int main(void)
|
|||||||
if (SUCCESS != image_sensor_init(ENABLE, &camera_cfg, &mjpeg_cfg)) {
|
if (SUCCESS != image_sensor_init(ENABLE, &camera_cfg, &mjpeg_cfg)) {
|
||||||
MSG("Camera Init error!\n");
|
MSG("Camera Init error!\n");
|
||||||
BL_CASE_FAIL;
|
BL_CASE_FAIL;
|
||||||
|
while (1) {
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
MSG("Camera Init success!\n");
|
MSG("Camera Init success!\n");
|
||||||
|
@ -525,6 +525,8 @@ int main(void)
|
|||||||
if (SUCCESS != image_sensor_init(ENABLE, &camera_cfg, &mjpeg_cfg)) {
|
if (SUCCESS != image_sensor_init(ENABLE, &camera_cfg, &mjpeg_cfg)) {
|
||||||
MSG("Camera Init error!\r\n");
|
MSG("Camera Init error!\r\n");
|
||||||
BL_CASE_FAIL;
|
BL_CASE_FAIL;
|
||||||
|
while (1) {
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
MSG("Camera Init success!\r\n");
|
MSG("Camera Init success!\r\n");
|
||||||
|
Reference in New Issue
Block a user