- Timestamp:
- Sep 25, 2020, 7:28:35 PM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
azure_iot_hub_riscv/trunk/app_iothub_client/src/kpu_main.c
r458 r459 148 148 } 149 149 150 void digitalWrite(uint8_t Pin, int dwVal); 150 /* 151 * ダイレクトデジタルピン出力 152 */ 153 void 154 digitalWrite(uint8_t Pin, int dwVal){ 155 int8_t gpio_pin = gpio_get_gpiohno(Pin, false); 156 157 if( gpio_pin >= 0){ 158 gpio_set_pin(TADR_GPIOHS_BASE, (uint8_t)gpio_pin, dwVal); 159 } 160 } 151 161 152 162 #if (CLASS_NUMBER > 1) … … 188 198 kpu_model_context_t g_task; 189 199 static region_layer_t detect_rl; 200 yolo_result_t yolo_result; 201 yolo_result_t yolo_result_frame; 190 202 191 203 volatile uint8_t g_ai_done_flag; … … 220 232 lcd_drawRect(&DrawProp, x1, y1, x2, y2, 2, ST7789_RED); 221 233 #endif 234 if (strcmp(class_lable[class].str, "person") == 0) 235 yolo_result_frame.person++; 236 if (strcmp(class_lable[class].str, "car") == 0) 237 yolo_result_frame.car++; 222 238 } 223 239 … … 247 263 syslog(LOG_NOTICE, "Sample program starts (exinf = %d).", (int_t) exinf); 248 264 249 pinMode(LED_PIN, OUTPUT); 265 pinMode(LED_G_PIN, OUTPUT); 266 digitalWrite(LED_G_PIN, HIGH); 267 pinMode(LED_R_PIN, OUTPUT); 268 digitalWrite(LED_R_PIN, HIGH); 269 pinMode(LED_B_PIN, OUTPUT); 270 digitalWrite(LED_B_PIN, HIGH); 250 271 251 272 select_spi0_dvp_mode(1); … … 523 544 lcd_drawPicture(hlcd, 0, 0, hcmr->_width, hcmr->_height, (uint16_t *)hcmr->_dataBuffer); 524 545 546 yolo_result_frame.person = 0; 547 yolo_result_frame.car = 0; 548 525 549 /* draw boxs */ 526 550 region_layer_draw_boxes(&detect_rl, drawboxes); 551 552 if (yolo_result.reset) { 553 yolo_result.reset = 0; 554 yolo_result.person = 0; 555 yolo_result.car = 0; 556 } 557 if (yolo_result.person < yolo_result_frame.person) 558 yolo_result.person = yolo_result_frame.person; 559 if (yolo_result.car < yolo_result_frame.car) 560 yolo_result.car = yolo_result_frame.car; 527 561 } 528 562 ov2640_activate(hcmr, false);
Note:
See TracChangeset
for help on using the changeset viewer.