ARM GAS /tmp/ccRWo4B1.s page 1 1 .cpu cortex-m0 2 .eabi_attribute 20, 1 3 .eabi_attribute 21, 1 4 .eabi_attribute 23, 3 5 .eabi_attribute 24, 1 6 .eabi_attribute 25, 1 7 .eabi_attribute 26, 1 8 .eabi_attribute 30, 1 9 .eabi_attribute 34, 0 10 .eabi_attribute 18, 4 11 .file "main.c" 12 .text 13 .Ltext0: 14 .cfi_sections .debug_frame 15 .section .text.MX_GPIO_Init,"ax",%progbits 16 .align 1 17 .syntax unified 18 .code 16 19 .thumb_func 20 .fpu softvfp 22 MX_GPIO_Init: 23 .LFB52: 24 .file 1 "Src/main.c" 1:Src/main.c **** 2:Src/main.c **** #include "main.h" 3:Src/main.c **** #include "usb_device.h" 4:Src/main.c **** #include "usbd_hid.h" 5:Src/main.c **** 6:Src/main.c **** #define HID_MEDIA_REPORT 2 7:Src/main.c **** #define HYSTERESIS 200 8:Src/main.c **** ADC_HandleTypeDef hadc; 9:Src/main.c **** DMA_HandleTypeDef hdma_adc; 10:Src/main.c **** 11:Src/main.c **** PCD_HandleTypeDef hpcd_USB_FS; 12:Src/main.c **** 13:Src/main.c **** void SystemClock_Config(void); 14:Src/main.c **** static void MX_GPIO_Init(void); 15:Src/main.c **** static void MX_DMA_Init(void); 16:Src/main.c **** static void MX_ADC_Init(void); 17:Src/main.c **** static void MX_USB_PCD_Init(void); 18:Src/main.c **** 19:Src/main.c **** void sendVolDown(void); 20:Src/main.c **** void sendVolUp(void); 21:Src/main.c **** 22:Src/main.c **** struct keyboard_report_t 23:Src/main.c **** { 24:Src/main.c **** 25:Src/main.c **** uint8_t id; 26:Src/main.c **** 27:Src/main.c **** uint8_t modifier; 28:Src/main.c **** uint8_t reserved; 29:Src/main.c **** uint8_t keycode[6]; 30:Src/main.c **** } kbd_report; 31:Src/main.c **** 32:Src/main.c **** uint16_t ADCreg[8]; 33:Src/main.c **** uint16_t ADCval[8]; 34:Src/main.c **** uint16_t ADClast[8]; ARM GAS /tmp/ccRWo4B1.s page 2 35:Src/main.c **** 36:Src/main.c **** int main(void) 37:Src/main.c **** { 38:Src/main.c **** HAL_Init(); 39:Src/main.c **** 40:Src/main.c **** SystemClock_Config(); 41:Src/main.c **** 42:Src/main.c **** MX_GPIO_Init(); 43:Src/main.c **** MX_DMA_Init(); 44:Src/main.c **** MX_ADC_Init(); 45:Src/main.c **** MX_USB_HID_INIT(); 46:Src/main.c **** 47:Src/main.c **** HAL_ADC_Start_DMA(&hadc, ADCreg, 8); 48:Src/main.c **** 49:Src/main.c **** while (1) 50:Src/main.c **** { 51:Src/main.c **** 52:Src/main.c **** 53:Src/main.c **** for(int i = 0; i < 8; i++){ 54:Src/main.c **** ADCval[i] = ADCreg[i]; 55:Src/main.c **** if(ADCval[i] - ADClast[i] > 2000 || ADClast[i] - ADCval[i] > 2000 ) ADClast[i] = ADCval[i]; 56:Src/main.c **** } 57:Src/main.c **** 58:Src/main.c **** // Volume Dial 8 59:Src/main.c **** if(ADCval[0] >= ADClast[0] + HYSTERESIS){ 60:Src/main.c **** sendVolUp(); 61:Src/main.c **** ADClast[0] = ADCval[0]; 62:Src/main.c **** } else if(ADCval[0] <= ADClast[0] - HYSTERESIS){ 63:Src/main.c **** sendVolDown(); 64:Src/main.c **** ADClast[0] = ADCval[0]; 65:Src/main.c **** } 66:Src/main.c **** 67:Src/main.c **** // Dial 1 68:Src/main.c **** if(ADCval[1] >= ADClast[1] + HYSTERESIS){ 69:Src/main.c **** } else if(ADCval[1] <= ADClast[1] - HYSTERESIS){ 70:Src/main.c **** } 71:Src/main.c **** 72:Src/main.c **** // SwitchLayer 73:Src/main.c **** if(ADCval[2] >= ADClast[2] + HYSTERESIS){ 74:Src/main.c **** kbd_send_ch('v'); 75:Src/main.c **** ADClast[2] = ADCval[2]; 76:Src/main.c **** } else if(ADCval[2] <= ADClast[2] - HYSTERESIS){ 77:Src/main.c **** kbd_send_ch('v'); 78:Src/main.c **** ADClast[2] = ADCval[2]; 79:Src/main.c **** } 80:Src/main.c **** 81:Src/main.c **** // RotatePart Dial 3 82:Src/main.c **** if(ADCval[3] >= ADClast[3] + HYSTERESIS){ 83:Src/main.c **** kbd_send_ch('R'); 84:Src/main.c **** ADClast[3] = ADCval[3]; 85:Src/main.c **** } else if(ADCval[3] <= ADClast[3] - HYSTERESIS){ 86:Src/main.c **** kbd_send_ch('r'); 87:Src/main.c **** ADClast[3] = ADCval[3]; 88:Src/main.c **** } 89:Src/main.c **** 90:Src/main.c **** // Grid Dial 4 91:Src/main.c **** if(ADCval[4] >= ADClast[4] + HYSTERESIS){ ARM GAS /tmp/ccRWo4B1.s page 3 92:Src/main.c **** kbd_send_ch('n'); 93:Src/main.c **** ADClast[4] = ADCval[4]; 94:Src/main.c **** } else if(ADCval[4] <= ADClast[4] - HYSTERESIS){ 95:Src/main.c **** kbd_send_ch('N'); 96:Src/main.c **** ADClast[4] = ADCval[4]; 97:Src/main.c **** } 98:Src/main.c **** 99:Src/main.c **** // via 100:Src/main.c **** if(ADCval[5] >= ADClast[5] + HYSTERESIS){ 101:Src/main.c **** } else if(ADCval[5] <= ADClast[5] - HYSTERESIS){ 102:Src/main.c **** } 103:Src/main.c **** 104:Src/main.c **** // Trackwidth Dial 6 105:Src/main.c **** if(ADCval[6] >= ADClast[6] + HYSTERESIS){ 106:Src/main.c **** kbd_send_ch('w'); 107:Src/main.c **** ADClast[6] = ADCval[6]; 108:Src/main.c **** } else if(ADCval[6] <= ADClast[6] - HYSTERESIS){ 109:Src/main.c **** kbd_send_ch('W'); 110:Src/main.c **** ADClast[6] = ADCval[6]; 111:Src/main.c **** } 112:Src/main.c **** 113:Src/main.c **** // zoom 114:Src/main.c **** if(ADCval[7] >= ADClast[7] + HYSTERESIS){ 115:Src/main.c **** kbd_send_raw(0x3a); 116:Src/main.c **** ADClast[7] = ADCval[7]; 117:Src/main.c **** } else if(ADCval[7] <= ADClast[7] - HYSTERESIS){ 118:Src/main.c **** kbd_send_raw(0x3b); 119:Src/main.c **** ADClast[7] = ADCval[7]; 120:Src/main.c **** } 121:Src/main.c **** 122:Src/main.c **** 123:Src/main.c **** //for(int i = 0; i < 8; i++){ 124:Src/main.c **** // ADClast[i] = ADCval[i]; 125:Src/main.c **** //} 126:Src/main.c **** HAL_Delay(10); 127:Src/main.c **** } 128:Src/main.c **** } 129:Src/main.c **** 130:Src/main.c **** 131:Src/main.c **** #define SHIFT 0x80 132:Src/main.c **** const uint8_t _asciimap[128] = 133:Src/main.c **** { 134:Src/main.c **** 0x00, // NUL 135:Src/main.c **** 0x00, // SOH 136:Src/main.c **** 0x00, // STX 137:Src/main.c **** 0x00, // ETX 138:Src/main.c **** 0x00, // EOT 139:Src/main.c **** 0x00, // ENQ 140:Src/main.c **** 0x00, // ACK 141:Src/main.c **** 0x00, // BEL 142:Src/main.c **** 0x2a, // BS Backspace 143:Src/main.c **** 0x2b, // TAB Tab 144:Src/main.c **** 0x28, // LF Enter 145:Src/main.c **** 0x00, // VT 146:Src/main.c **** 0x00, // FF 147:Src/main.c **** 0x00, // CR 148:Src/main.c **** 0x00, // SO ARM GAS /tmp/ccRWo4B1.s page 4 149:Src/main.c **** 0x00, // SI 150:Src/main.c **** 0x00, // DEL 151:Src/main.c **** 0x00, // DC1 152:Src/main.c **** 0x00, // DC2 153:Src/main.c **** 0x00, // DC3 154:Src/main.c **** 0x00, // DC4 155:Src/main.c **** 0x00, // NAK 156:Src/main.c **** 0x00, // SYN 157:Src/main.c **** 0x00, // ETB 158:Src/main.c **** 0x00, // CAN 159:Src/main.c **** 0x00, // EM 160:Src/main.c **** 0x00, // SUB 161:Src/main.c **** 0x00, // ESC 162:Src/main.c **** 0x00, // FS 163:Src/main.c **** 0x00, // GS 164:Src/main.c **** 0x00, // RS 165:Src/main.c **** 0x00, // US 166:Src/main.c **** 167:Src/main.c **** 0x2c, // ' ' 168:Src/main.c **** 0x1e|SHIFT, // ! 169:Src/main.c **** 0x34|SHIFT, // " 170:Src/main.c **** 0x20|SHIFT, // # 171:Src/main.c **** 0x21|SHIFT, // $ 172:Src/main.c **** 0x22|SHIFT, // % 173:Src/main.c **** 0x24|SHIFT, // & 174:Src/main.c **** 0x34, // ' 175:Src/main.c **** 0x26|SHIFT, // ( 176:Src/main.c **** 0x27|SHIFT, // ) 177:Src/main.c **** 0x25|SHIFT, // * 178:Src/main.c **** 0x2e|SHIFT, // + 179:Src/main.c **** 0x36, // , 180:Src/main.c **** 0x2d, // - 181:Src/main.c **** 0x37, // . 182:Src/main.c **** 0x38, // / 183:Src/main.c **** 0x27, // 0 184:Src/main.c **** 0x1e, // 1 185:Src/main.c **** 0x1f, // 2 186:Src/main.c **** 0x20, // 3 187:Src/main.c **** 0x21, // 4 188:Src/main.c **** 0x22, // 5 189:Src/main.c **** 0x23, // 6 190:Src/main.c **** 0x24, // 7 191:Src/main.c **** 0x25, // 8 192:Src/main.c **** 0x26, // 9 193:Src/main.c **** 0x33|SHIFT, // : 194:Src/main.c **** 0x33, // ; 195:Src/main.c **** 0x36|SHIFT, // < 196:Src/main.c **** 0x2e, // = 197:Src/main.c **** 0x37|SHIFT, // > 198:Src/main.c **** 0x38|SHIFT, // ? 199:Src/main.c **** 0x1f|SHIFT, // @ 200:Src/main.c **** 0x04|SHIFT, // A 201:Src/main.c **** 0x05|SHIFT, // B 202:Src/main.c **** 0x06|SHIFT, // C 203:Src/main.c **** 0x07|SHIFT, // D 204:Src/main.c **** 0x08|SHIFT, // E 205:Src/main.c **** 0x09|SHIFT, // F ARM GAS /tmp/ccRWo4B1.s page 5 206:Src/main.c **** 0x0a|SHIFT, // G 207:Src/main.c **** 0x0b|SHIFT, // H 208:Src/main.c **** 0x0c|SHIFT, // I 209:Src/main.c **** 0x0d|SHIFT, // J 210:Src/main.c **** 0x0e|SHIFT, // K 211:Src/main.c **** 0x0f|SHIFT, // L 212:Src/main.c **** 0x10|SHIFT, // M 213:Src/main.c **** 0x11|SHIFT, // N 214:Src/main.c **** 0x12|SHIFT, // O 215:Src/main.c **** 0x13|SHIFT, // P 216:Src/main.c **** 0x14|SHIFT, // Q 217:Src/main.c **** 0x15|SHIFT, // R 218:Src/main.c **** 0x16|SHIFT, // S 219:Src/main.c **** 0x17|SHIFT, // T 220:Src/main.c **** 0x18|SHIFT, // U 221:Src/main.c **** 0x19|SHIFT, // V 222:Src/main.c **** 0x1a|SHIFT, // W 223:Src/main.c **** 0x1b|SHIFT, // X 224:Src/main.c **** 0x1c|SHIFT, // Y 225:Src/main.c **** 0x1d|SHIFT, // Z 226:Src/main.c **** 0x2f, // [ 227:Src/main.c **** 0x31, // bslash 228:Src/main.c **** 0x30, // ] 229:Src/main.c **** 0x23|SHIFT, // ^ 230:Src/main.c **** 0x2d|SHIFT, // _ 231:Src/main.c **** 0x35, // ` 232:Src/main.c **** 0x04, // a 233:Src/main.c **** 0x05, // b 234:Src/main.c **** 0x06, // c 235:Src/main.c **** 0x07, // d 236:Src/main.c **** 0x08, // e 237:Src/main.c **** 0x09, // f 238:Src/main.c **** 0x0a, // g 239:Src/main.c **** 0x0b, // h 240:Src/main.c **** 0x0c, // i 241:Src/main.c **** 0x0d, // j 242:Src/main.c **** 0x0e, // k 243:Src/main.c **** 0x0f, // l 244:Src/main.c **** 0x10, // m 245:Src/main.c **** 0x11, // n 246:Src/main.c **** 0x12, // o 247:Src/main.c **** 0x13, // p 248:Src/main.c **** 0x14, // q 249:Src/main.c **** 0x15, // r 250:Src/main.c **** 0x16, // s 251:Src/main.c **** 0x17, // t 252:Src/main.c **** 0x18, // u 253:Src/main.c **** 0x19, // v 254:Src/main.c **** 0x1a, // w 255:Src/main.c **** 0x1b, // x 256:Src/main.c **** 0x1c, // y 257:Src/main.c **** 0x1d, // z 258:Src/main.c **** 0x2f|SHIFT, // { 259:Src/main.c **** 0x31|SHIFT, // | 260:Src/main.c **** 0x30|SHIFT, // } 261:Src/main.c **** 0x35|SHIFT, // ~ 262:Src/main.c **** 0 // DEL ARM GAS /tmp/ccRWo4B1.s page 6 263:Src/main.c **** }; 264:Src/main.c **** 265:Src/main.c **** 266:Src/main.c **** int scan_cvt=1; 267:Src/main.c **** void kbd_send_ch(uint8_t ch){ 268:Src/main.c **** int code; 269:Src/main.c **** int i; 270:Src/main.c **** if( scan_cvt ){ 271:Src/main.c **** if( ch > 128 ) ch -=128; 272:Src/main.c **** code = _asciimap[ch]; 273:Src/main.c **** } 274:Src/main.c **** else 275:Src/main.c **** code = ch; 276:Src/main.c **** 277:Src/main.c **** 278:Src/main.c **** //id set here must be consistent with the one in Hid report descriptor 279:Src/main.c **** // 0x85, 0x01, // Report ID (1) 280:Src/main.c **** kbd_report.id = 1; 281:Src/main.c **** 282:Src/main.c **** kbd_report.keycode[0]=code&0x7F; 283:Src/main.c **** kbd_report.keycode[1]=0; 284:Src/main.c **** if ( code & 0x80) { // it's a capital letter or other character reached with s 285:Src/main.c **** kbd_report.modifier |= 0x02; // the left shift modifier 286:Src/main.c **** } 287:Src/main.c **** for( i=0; i< 4;i++){ 288:Src/main.c **** USBD_HID_SendReport(&hUsbDeviceFS, (uint8_t *)&kbd_report, sizeof(kbd_report)); 289:Src/main.c **** HAL_Delay(10); 290:Src/main.c **** } 291:Src/main.c **** memset(kbd_report.keycode, 0 , sizeof(kbd_report.keycode)); 292:Src/main.c **** kbd_report.modifier = 0; 293:Src/main.c **** USBD_HID_SendReport(&hUsbDeviceFS, (uint8_t *)&kbd_report, sizeof(kbd_report)); 294:Src/main.c **** HAL_Delay(10); 295:Src/main.c **** } 296:Src/main.c **** 297:Src/main.c **** void kbd_send_raw(uint8_t ch){ 298:Src/main.c **** int code; 299:Src/main.c **** int i; 300:Src/main.c **** code = ch; 301:Src/main.c **** 302:Src/main.c **** 303:Src/main.c **** //id set here must be consistent with the one in Hid report descriptor 304:Src/main.c **** // 0x85, 0x01, // Report ID (1) 305:Src/main.c **** kbd_report.id = 1; 306:Src/main.c **** 307:Src/main.c **** kbd_report.keycode[0]=ch&0x7F; 308:Src/main.c **** kbd_report.keycode[1]=0; 309:Src/main.c **** if ( code & 0x80) { // it's a capital letter or other character reached with s 310:Src/main.c **** kbd_report.modifier |= 0x02; // the left shift modifier 311:Src/main.c **** } 312:Src/main.c **** for( i=0; i< 4;i++){ 313:Src/main.c **** USBD_HID_SendReport(&hUsbDeviceFS, (uint8_t *)&kbd_report, sizeof(kbd_report)); 314:Src/main.c **** HAL_Delay(10); 315:Src/main.c **** } 316:Src/main.c **** memset(kbd_report.keycode, 0 , sizeof(kbd_report.keycode)); 317:Src/main.c **** kbd_report.modifier = 0; 318:Src/main.c **** USBD_HID_SendReport(&hUsbDeviceFS, (uint8_t *)&kbd_report, sizeof(kbd_report)); 319:Src/main.c **** HAL_Delay(10); ARM GAS /tmp/ccRWo4B1.s page 7 320:Src/main.c **** } 321:Src/main.c **** 322:Src/main.c **** void sendVolUp(){ 323:Src/main.c **** uint8_t report[3]; 324:Src/main.c **** report[0]= HID_MEDIA_REPORT; 325:Src/main.c **** report[1]= 0xE9; 326:Src/main.c **** report[2]= 0x00; 327:Src/main.c **** USBD_HID_SendReport(&hUsbDeviceFS, report, 3); 328:Src/main.c **** HAL_Delay(10); 329:Src/main.c **** 330:Src/main.c **** report[0]= HID_MEDIA_REPORT; 331:Src/main.c **** report[1]= 0x00; 332:Src/main.c **** report[2]= 0x00; 333:Src/main.c **** USBD_HID_SendReport(&hUsbDeviceFS, report, 3); 334:Src/main.c **** } 335:Src/main.c **** 336:Src/main.c **** void sendVolDown(){ 337:Src/main.c **** uint8_t report[3]; 338:Src/main.c **** report[0]= HID_MEDIA_REPORT; 339:Src/main.c **** report[1]= 0xEA; 340:Src/main.c **** report[2]= 0x00; 341:Src/main.c **** USBD_HID_SendReport(&hUsbDeviceFS, report, 3); 342:Src/main.c **** HAL_Delay(10); 343:Src/main.c **** 344:Src/main.c **** report[0]= HID_MEDIA_REPORT; 345:Src/main.c **** report[1]= 0x00; 346:Src/main.c **** report[2]= 0x00; 347:Src/main.c **** USBD_HID_SendReport(&hUsbDeviceFS, report, 3); 348:Src/main.c **** } 349:Src/main.c **** 350:Src/main.c **** void SystemClock_Config(void) 351:Src/main.c **** { 352:Src/main.c **** RCC_OscInitTypeDef RCC_OscInitStruct = {0}; 353:Src/main.c **** RCC_ClkInitTypeDef RCC_ClkInitStruct = {0}; 354:Src/main.c **** RCC_PeriphCLKInitTypeDef PeriphClkInit = {0}; 355:Src/main.c **** 356:Src/main.c **** RCC_OscInitStruct.OscillatorType = RCC_OSCILLATORTYPE_HSI14|RCC_OSCILLATORTYPE_HSI48; 357:Src/main.c **** RCC_OscInitStruct.HSI48State = RCC_HSI48_ON; 358:Src/main.c **** RCC_OscInitStruct.HSI14State = RCC_HSI14_ON; 359:Src/main.c **** RCC_OscInitStruct.HSI14CalibrationValue = 16; 360:Src/main.c **** RCC_OscInitStruct.PLL.PLLState = RCC_PLL_NONE; 361:Src/main.c **** HAL_RCC_OscConfig(&RCC_OscInitStruct); 362:Src/main.c **** 363:Src/main.c **** RCC_ClkInitStruct.ClockType = RCC_CLOCKTYPE_HCLK|RCC_CLOCKTYPE_SYSCLK 364:Src/main.c **** |RCC_CLOCKTYPE_PCLK1; 365:Src/main.c **** RCC_ClkInitStruct.SYSCLKSource = RCC_SYSCLKSOURCE_HSI48; 366:Src/main.c **** RCC_ClkInitStruct.AHBCLKDivider = RCC_SYSCLK_DIV1; 367:Src/main.c **** RCC_ClkInitStruct.APB1CLKDivider = RCC_HCLK_DIV1; 368:Src/main.c **** HAL_RCC_ClockConfig(&RCC_ClkInitStruct, FLASH_LATENCY_1); 369:Src/main.c **** 370:Src/main.c **** PeriphClkInit.PeriphClockSelection = RCC_PERIPHCLK_USB; 371:Src/main.c **** PeriphClkInit.UsbClockSelection = RCC_USBCLKSOURCE_HSI48; 372:Src/main.c **** HAL_RCCEx_PeriphCLKConfig(&PeriphClkInit); 373:Src/main.c **** 374:Src/main.c **** } 375:Src/main.c **** 376:Src/main.c **** static void MX_ADC_Init(void) ARM GAS /tmp/ccRWo4B1.s page 8 377:Src/main.c **** { 378:Src/main.c **** 379:Src/main.c **** ADC_ChannelConfTypeDef sConfig = {0}; 380:Src/main.c **** 381:Src/main.c **** hadc.Instance = ADC1; 382:Src/main.c **** hadc.Init.ClockPrescaler = ADC_CLOCK_ASYNC_DIV1; 383:Src/main.c **** hadc.Init.Resolution = ADC_RESOLUTION_12B; 384:Src/main.c **** hadc.Init.DataAlign = ADC_DATAALIGN_RIGHT; 385:Src/main.c **** hadc.Init.ScanConvMode = ADC_SCAN_DIRECTION_FORWARD; 386:Src/main.c **** hadc.Init.EOCSelection = ADC_EOC_SEQ_CONV; 387:Src/main.c **** hadc.Init.LowPowerAutoWait = DISABLE; 388:Src/main.c **** hadc.Init.LowPowerAutoPowerOff = DISABLE; 389:Src/main.c **** hadc.Init.ContinuousConvMode = ENABLE; 390:Src/main.c **** hadc.Init.DiscontinuousConvMode = DISABLE; 391:Src/main.c **** hadc.Init.ExternalTrigConv = ADC_SOFTWARE_START; 392:Src/main.c **** hadc.Init.ExternalTrigConvEdge = ADC_EXTERNALTRIGCONVEDGE_NONE; 393:Src/main.c **** hadc.Init.DMAContinuousRequests = ENABLE; 394:Src/main.c **** hadc.Init.Overrun = ADC_OVR_DATA_PRESERVED; 395:Src/main.c **** HAL_ADC_Init(&hadc); 396:Src/main.c **** 397:Src/main.c **** sConfig.Rank = ADC_RANK_CHANNEL_NUMBER; 398:Src/main.c **** sConfig.SamplingTime = ADC_SAMPLETIME_71CYCLES_5; 399:Src/main.c **** sConfig.Channel = ADC_CHANNEL_1; 400:Src/main.c **** HAL_ADC_ConfigChannel(&hadc, &sConfig); 401:Src/main.c **** 402:Src/main.c **** sConfig.Channel = ADC_CHANNEL_2; 403:Src/main.c **** HAL_ADC_ConfigChannel(&hadc, &sConfig); 404:Src/main.c **** 405:Src/main.c **** sConfig.Channel = ADC_CHANNEL_3; 406:Src/main.c **** HAL_ADC_ConfigChannel(&hadc, &sConfig); 407:Src/main.c **** 408:Src/main.c **** sConfig.Channel = ADC_CHANNEL_4; 409:Src/main.c **** HAL_ADC_ConfigChannel(&hadc, &sConfig); 410:Src/main.c **** 411:Src/main.c **** sConfig.Channel = ADC_CHANNEL_5; 412:Src/main.c **** HAL_ADC_ConfigChannel(&hadc, &sConfig); 413:Src/main.c **** 414:Src/main.c **** sConfig.Channel = ADC_CHANNEL_6; 415:Src/main.c **** HAL_ADC_ConfigChannel(&hadc, &sConfig); 416:Src/main.c **** 417:Src/main.c **** sConfig.Channel = ADC_CHANNEL_7; 418:Src/main.c **** HAL_ADC_ConfigChannel(&hadc, &sConfig); 419:Src/main.c **** 420:Src/main.c **** sConfig.Channel = ADC_CHANNEL_8; 421:Src/main.c **** HAL_ADC_ConfigChannel(&hadc, &sConfig); 422:Src/main.c **** } 423:Src/main.c **** 424:Src/main.c **** static void MX_USB_PCD_Init(void) 425:Src/main.c **** { 426:Src/main.c **** 427:Src/main.c **** hpcd_USB_FS.Instance = USB; 428:Src/main.c **** hpcd_USB_FS.Init.dev_endpoints = 8; 429:Src/main.c **** hpcd_USB_FS.Init.speed = PCD_SPEED_FULL; 430:Src/main.c **** hpcd_USB_FS.Init.phy_itface = PCD_PHY_EMBEDDED; 431:Src/main.c **** hpcd_USB_FS.Init.low_power_enable = DISABLE; 432:Src/main.c **** hpcd_USB_FS.Init.lpm_enable = DISABLE; 433:Src/main.c **** hpcd_USB_FS.Init.battery_charging_enable = DISABLE; ARM GAS /tmp/ccRWo4B1.s page 9 434:Src/main.c **** HAL_PCD_Init(&hpcd_USB_FS); 435:Src/main.c **** } 436:Src/main.c **** 437:Src/main.c **** 438:Src/main.c **** static void MX_DMA_Init(void) 439:Src/main.c **** { 440:Src/main.c **** __HAL_RCC_DMA1_CLK_ENABLE(); 441:Src/main.c **** 442:Src/main.c **** HAL_NVIC_SetPriority(DMA1_Channel1_IRQn, 0, 0); 443:Src/main.c **** HAL_NVIC_EnableIRQ(DMA1_Channel1_IRQn); 444:Src/main.c **** } 445:Src/main.c **** 446:Src/main.c **** 447:Src/main.c **** static void MX_GPIO_Init(void) 448:Src/main.c **** { 25 .loc 1 448 0 26 .cfi_startproc 27 @ args = 0, pretend = 0, frame = 32 28 @ frame_needed = 0, uses_anonymous_args = 0 29 0000 30B5 push {r4, r5, lr} 30 .LCFI0: 31 .cfi_def_cfa_offset 12 32 .cfi_offset 4, -12 33 .cfi_offset 5, -8 34 .cfi_offset 14, -4 35 0002 89B0 sub sp, sp, #36 36 .LCFI1: 37 .cfi_def_cfa_offset 48 449:Src/main.c **** 450:Src/main.c **** GPIO_InitTypeDef GPIO_InitStruct = {0}; 38 .loc 1 450 0 39 0004 1422 movs r2, #20 40 0006 0021 movs r1, #0 41 0008 03A8 add r0, sp, #12 42 000a FFF7FEFF bl memset 43 .LVL0: 44 .LBB2: 451:Src/main.c **** 452:Src/main.c **** __HAL_RCC_GPIOB_CLK_ENABLE(); 45 .loc 1 452 0 46 000e 134B ldr r3, .L2 47 0010 5969 ldr r1, [r3, #20] 48 0012 8020 movs r0, #128 49 0014 C002 lsls r0, r0, #11 50 0016 0143 orrs r1, r0 51 0018 5961 str r1, [r3, #20] 52 001a 5A69 ldr r2, [r3, #20] 53 001c 0240 ands r2, r0 54 001e 0192 str r2, [sp, #4] 55 0020 019A ldr r2, [sp, #4] 56 .LBE2: 57 .LBB3: 453:Src/main.c **** __HAL_RCC_GPIOA_CLK_ENABLE(); 58 .loc 1 453 0 59 0022 5A69 ldr r2, [r3, #20] 60 0024 8021 movs r1, #128 61 0026 8902 lsls r1, r1, #10 ARM GAS /tmp/ccRWo4B1.s page 10 62 0028 0A43 orrs r2, r1 63 002a 5A61 str r2, [r3, #20] 64 002c 5B69 ldr r3, [r3, #20] 65 002e 0B40 ands r3, r1 66 0030 0293 str r3, [sp, #8] 67 0032 029B ldr r3, [sp, #8] 68 .LBE3: 454:Src/main.c **** 455:Src/main.c **** HAL_GPIO_WritePin(GPIOB, GPIO_PIN_13, GPIO_PIN_RESET); 69 .loc 1 455 0 70 0034 8025 movs r5, #128 71 0036 AD01 lsls r5, r5, #6 72 0038 094C ldr r4, .L2+4 73 003a 0022 movs r2, #0 74 003c 2900 movs r1, r5 75 003e 2000 movs r0, r4 76 0040 FFF7FEFF bl HAL_GPIO_WritePin 77 .LVL1: 456:Src/main.c **** 457:Src/main.c **** GPIO_InitStruct.Pin = GPIO_PIN_13; 78 .loc 1 457 0 79 0044 0395 str r5, [sp, #12] 458:Src/main.c **** GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_PP; 80 .loc 1 458 0 81 0046 0123 movs r3, #1 82 0048 0493 str r3, [sp, #16] 459:Src/main.c **** GPIO_InitStruct.Pull = GPIO_NOPULL; 83 .loc 1 459 0 84 004a 0023 movs r3, #0 85 004c 0593 str r3, [sp, #20] 460:Src/main.c **** GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW; 86 .loc 1 460 0 87 004e 0693 str r3, [sp, #24] 461:Src/main.c **** HAL_GPIO_Init(GPIOB, &GPIO_InitStruct); 88 .loc 1 461 0 89 0050 03A9 add r1, sp, #12 90 0052 2000 movs r0, r4 91 0054 FFF7FEFF bl HAL_GPIO_Init 92 .LVL2: 462:Src/main.c **** } 93 .loc 1 462 0 94 0058 09B0 add sp, sp, #36 95 @ sp needed 96 005a 30BD pop {r4, r5, pc} 97 .L3: 98 .align 2 99 .L2: 100 005c 00100240 .word 1073876992 101 0060 00040048 .word 1207960576 102 .cfi_endproc 103 .LFE52: 105 .section .text.MX_DMA_Init,"ax",%progbits 106 .align 1 107 .syntax unified 108 .code 16 109 .thumb_func 110 .fpu softvfp ARM GAS /tmp/ccRWo4B1.s page 11 112 MX_DMA_Init: 113 .LFB51: 439:Src/main.c **** __HAL_RCC_DMA1_CLK_ENABLE(); 114 .loc 1 439 0 115 .cfi_startproc 116 @ args = 0, pretend = 0, frame = 8 117 @ frame_needed = 0, uses_anonymous_args = 0 118 0000 00B5 push {lr} 119 .LCFI2: 120 .cfi_def_cfa_offset 4 121 .cfi_offset 14, -4 122 0002 83B0 sub sp, sp, #12 123 .LCFI3: 124 .cfi_def_cfa_offset 16 125 .LBB4: 440:Src/main.c **** 126 .loc 1 440 0 127 0004 094A ldr r2, .L5 128 0006 5169 ldr r1, [r2, #20] 129 0008 0123 movs r3, #1 130 000a 1943 orrs r1, r3 131 000c 5161 str r1, [r2, #20] 132 000e 5269 ldr r2, [r2, #20] 133 0010 1340 ands r3, r2 134 0012 0193 str r3, [sp, #4] 135 0014 019B ldr r3, [sp, #4] 136 .LBE4: 442:Src/main.c **** HAL_NVIC_EnableIRQ(DMA1_Channel1_IRQn); 137 .loc 1 442 0 138 0016 0022 movs r2, #0 139 0018 0021 movs r1, #0 140 001a 0920 movs r0, #9 141 001c FFF7FEFF bl HAL_NVIC_SetPriority 142 .LVL3: 443:Src/main.c **** } 143 .loc 1 443 0 144 0020 0920 movs r0, #9 145 0022 FFF7FEFF bl HAL_NVIC_EnableIRQ 146 .LVL4: 444:Src/main.c **** 147 .loc 1 444 0 148 0026 03B0 add sp, sp, #12 149 @ sp needed 150 0028 00BD pop {pc} 151 .L6: 152 002a C046 .align 2 153 .L5: 154 002c 00100240 .word 1073876992 155 .cfi_endproc 156 .LFE51: 158 .section .text.MX_ADC_Init,"ax",%progbits 159 .align 1 160 .syntax unified 161 .code 16 162 .thumb_func 163 .fpu softvfp 165 MX_ADC_Init: ARM GAS /tmp/ccRWo4B1.s page 12 166 .LFB49: 377:Src/main.c **** 167 .loc 1 377 0 168 .cfi_startproc 169 @ args = 0, pretend = 0, frame = 16 170 @ frame_needed = 0, uses_anonymous_args = 0 171 0000 F0B5 push {r4, r5, r6, r7, lr} 172 .LCFI4: 173 .cfi_def_cfa_offset 20 174 .cfi_offset 4, -20 175 .cfi_offset 5, -16 176 .cfi_offset 6, -12 177 .cfi_offset 7, -8 178 .cfi_offset 14, -4 179 0002 85B0 sub sp, sp, #20 180 .LCFI5: 181 .cfi_def_cfa_offset 40 379:Src/main.c **** 182 .loc 1 379 0 183 0004 0C22 movs r2, #12 184 0006 0021 movs r1, #0 185 0008 01A8 add r0, sp, #4 186 000a FFF7FEFF bl memset 187 .LVL5: 381:Src/main.c **** hadc.Init.ClockPrescaler = ADC_CLOCK_ASYNC_DIV1; 188 .loc 1 381 0 189 000e 264C ldr r4, .L8 190 0010 264B ldr r3, .L8+4 191 0012 2360 str r3, [r4] 382:Src/main.c **** hadc.Init.Resolution = ADC_RESOLUTION_12B; 192 .loc 1 382 0 193 0014 0023 movs r3, #0 194 0016 6360 str r3, [r4, #4] 383:Src/main.c **** hadc.Init.DataAlign = ADC_DATAALIGN_RIGHT; 195 .loc 1 383 0 196 0018 A360 str r3, [r4, #8] 384:Src/main.c **** hadc.Init.ScanConvMode = ADC_SCAN_DIRECTION_FORWARD; 197 .loc 1 384 0 198 001a E360 str r3, [r4, #12] 385:Src/main.c **** hadc.Init.EOCSelection = ADC_EOC_SEQ_CONV; 199 .loc 1 385 0 200 001c 0125 movs r5, #1 201 001e 2561 str r5, [r4, #16] 386:Src/main.c **** hadc.Init.LowPowerAutoWait = DISABLE; 202 .loc 1 386 0 203 0020 0826 movs r6, #8 204 0022 6661 str r6, [r4, #20] 387:Src/main.c **** hadc.Init.LowPowerAutoPowerOff = DISABLE; 205 .loc 1 387 0 206 0024 2376 strb r3, [r4, #24] 388:Src/main.c **** hadc.Init.ContinuousConvMode = ENABLE; 207 .loc 1 388 0 208 0026 6376 strb r3, [r4, #25] 389:Src/main.c **** hadc.Init.DiscontinuousConvMode = DISABLE; 209 .loc 1 389 0 210 0028 A576 strb r5, [r4, #26] 390:Src/main.c **** hadc.Init.ExternalTrigConv = ADC_SOFTWARE_START; ARM GAS /tmp/ccRWo4B1.s page 13 211 .loc 1 390 0 212 002a E376 strb r3, [r4, #27] 391:Src/main.c **** hadc.Init.ExternalTrigConvEdge = ADC_EXTERNALTRIGCONVEDGE_NONE; 213 .loc 1 391 0 214 002c C222 movs r2, #194 215 002e FF32 adds r2, r2, #255 216 0030 E261 str r2, [r4, #28] 392:Src/main.c **** hadc.Init.DMAContinuousRequests = ENABLE; 217 .loc 1 392 0 218 0032 2362 str r3, [r4, #32] 393:Src/main.c **** hadc.Init.Overrun = ADC_OVR_DATA_PRESERVED; 219 .loc 1 393 0 220 0034 2433 adds r3, r3, #36 221 0036 E554 strb r5, [r4, r3] 394:Src/main.c **** HAL_ADC_Init(&hadc); 222 .loc 1 394 0 223 0038 A562 str r5, [r4, #40] 395:Src/main.c **** 224 .loc 1 395 0 225 003a 2000 movs r0, r4 226 003c FFF7FEFF bl HAL_ADC_Init 227 .LVL6: 397:Src/main.c **** sConfig.SamplingTime = ADC_SAMPLETIME_71CYCLES_5; 228 .loc 1 397 0 229 0040 8023 movs r3, #128 230 0042 5B01 lsls r3, r3, #5 231 0044 0293 str r3, [sp, #8] 398:Src/main.c **** sConfig.Channel = ADC_CHANNEL_1; 232 .loc 1 398 0 233 0046 0627 movs r7, #6 234 0048 0397 str r7, [sp, #12] 399:Src/main.c **** HAL_ADC_ConfigChannel(&hadc, &sConfig); 235 .loc 1 399 0 236 004a 0195 str r5, [sp, #4] 400:Src/main.c **** 237 .loc 1 400 0 238 004c 01A9 add r1, sp, #4 239 004e 2000 movs r0, r4 240 0050 FFF7FEFF bl HAL_ADC_ConfigChannel 241 .LVL7: 402:Src/main.c **** HAL_ADC_ConfigChannel(&hadc, &sConfig); 242 .loc 1 402 0 243 0054 0223 movs r3, #2 244 0056 0193 str r3, [sp, #4] 403:Src/main.c **** 245 .loc 1 403 0 246 0058 01A9 add r1, sp, #4 247 005a 2000 movs r0, r4 248 005c FFF7FEFF bl HAL_ADC_ConfigChannel 249 .LVL8: 405:Src/main.c **** HAL_ADC_ConfigChannel(&hadc, &sConfig); 250 .loc 1 405 0 251 0060 0323 movs r3, #3 252 0062 0193 str r3, [sp, #4] 406:Src/main.c **** 253 .loc 1 406 0 254 0064 01A9 add r1, sp, #4 ARM GAS /tmp/ccRWo4B1.s page 14 255 0066 2000 movs r0, r4 256 0068 FFF7FEFF bl HAL_ADC_ConfigChannel 257 .LVL9: 408:Src/main.c **** HAL_ADC_ConfigChannel(&hadc, &sConfig); 258 .loc 1 408 0 259 006c 0423 movs r3, #4 260 006e 0193 str r3, [sp, #4] 409:Src/main.c **** 261 .loc 1 409 0 262 0070 01A9 add r1, sp, #4 263 0072 2000 movs r0, r4 264 0074 FFF7FEFF bl HAL_ADC_ConfigChannel 265 .LVL10: 411:Src/main.c **** HAL_ADC_ConfigChannel(&hadc, &sConfig); 266 .loc 1 411 0 267 0078 0523 movs r3, #5 268 007a 0193 str r3, [sp, #4] 412:Src/main.c **** 269 .loc 1 412 0 270 007c 01A9 add r1, sp, #4 271 007e 2000 movs r0, r4 272 0080 FFF7FEFF bl HAL_ADC_ConfigChannel 273 .LVL11: 414:Src/main.c **** HAL_ADC_ConfigChannel(&hadc, &sConfig); 274 .loc 1 414 0 275 0084 0197 str r7, [sp, #4] 415:Src/main.c **** 276 .loc 1 415 0 277 0086 01A9 add r1, sp, #4 278 0088 2000 movs r0, r4 279 008a FFF7FEFF bl HAL_ADC_ConfigChannel 280 .LVL12: 417:Src/main.c **** HAL_ADC_ConfigChannel(&hadc, &sConfig); 281 .loc 1 417 0 282 008e 0723 movs r3, #7 283 0090 0193 str r3, [sp, #4] 418:Src/main.c **** 284 .loc 1 418 0 285 0092 01A9 add r1, sp, #4 286 0094 2000 movs r0, r4 287 0096 FFF7FEFF bl HAL_ADC_ConfigChannel 288 .LVL13: 420:Src/main.c **** HAL_ADC_ConfigChannel(&hadc, &sConfig); 289 .loc 1 420 0 290 009a 0196 str r6, [sp, #4] 421:Src/main.c **** } 291 .loc 1 421 0 292 009c 01A9 add r1, sp, #4 293 009e 2000 movs r0, r4 294 00a0 FFF7FEFF bl HAL_ADC_ConfigChannel 295 .LVL14: 422:Src/main.c **** 296 .loc 1 422 0 297 00a4 05B0 add sp, sp, #20 298 @ sp needed 299 00a6 F0BD pop {r4, r5, r6, r7, pc} 300 .L9: ARM GAS /tmp/ccRWo4B1.s page 15 301 .align 2 302 .L8: 303 00a8 00000000 .word hadc 304 00ac 00240140 .word 1073816576 305 .cfi_endproc 306 .LFE49: 308 .section .text.kbd_send_ch,"ax",%progbits 309 .align 1 310 .global kbd_send_ch 311 .syntax unified 312 .code 16 313 .thumb_func 314 .fpu softvfp 316 kbd_send_ch: 317 .LFB44: 267:Src/main.c **** int code; 318 .loc 1 267 0 319 .cfi_startproc 320 @ args = 0, pretend = 0, frame = 0 321 @ frame_needed = 0, uses_anonymous_args = 0 322 .LVL15: 323 0000 10B5 push {r4, lr} 324 .LCFI6: 325 .cfi_def_cfa_offset 8 326 .cfi_offset 4, -8 327 .cfi_offset 14, -4 270:Src/main.c **** if( ch > 128 ) ch -=128; 328 .loc 1 270 0 329 0002 1B4B ldr r3, .L17 330 0004 1B68 ldr r3, [r3] 331 0006 002B cmp r3, #0 332 0008 05D0 beq .L13 271:Src/main.c **** code = _asciimap[ch]; 333 .loc 1 271 0 334 000a 8028 cmp r0, #128 335 000c 01D9 bls .L12 271:Src/main.c **** code = _asciimap[ch]; 336 .loc 1 271 0 is_stmt 0 discriminator 1 337 000e 8038 subs r0, r0, #128 338 .LVL16: 339 0010 C0B2 uxtb r0, r0 340 .LVL17: 341 .L12: 272:Src/main.c **** } 342 .loc 1 272 0 is_stmt 1 343 0012 184B ldr r3, .L17+4 344 0014 185C ldrb r0, [r3, r0] 345 .LVL18: 346 .L13: 280:Src/main.c **** 347 .loc 1 280 0 348 0016 184B ldr r3, .L17+8 349 0018 0122 movs r2, #1 350 001a 1A70 strb r2, [r3] 282:Src/main.c **** kbd_report.keycode[1]=0; 351 .loc 1 282 0 352 001c 7E32 adds r2, r2, #126 ARM GAS /tmp/ccRWo4B1.s page 16 353 001e 0240 ands r2, r0 354 0020 DA70 strb r2, [r3, #3] 283:Src/main.c **** if ( code & 0x80) { // it's a capital letter or other character reached with s 355 .loc 1 283 0 356 0022 0022 movs r2, #0 357 0024 1A71 strb r2, [r3, #4] 284:Src/main.c **** kbd_report.modifier |= 0x02; // the left shift modifier 358 .loc 1 284 0 359 0026 0306 lsls r3, r0, #24 360 0028 04D5 bpl .L14 285:Src/main.c **** } 361 .loc 1 285 0 362 002a 134A ldr r2, .L17+8 363 002c 5378 ldrb r3, [r2, #1] 364 002e 0221 movs r1, #2 365 0030 0B43 orrs r3, r1 366 0032 5370 strb r3, [r2, #1] 367 .L14: 267:Src/main.c **** int code; 368 .loc 1 267 0 discriminator 1 369 0034 0024 movs r4, #0 370 0036 08E0 b .L15 371 .LVL19: 372 .L16: 288:Src/main.c **** HAL_Delay(10); 373 .loc 1 288 0 discriminator 3 374 0038 0922 movs r2, #9 375 003a 0F49 ldr r1, .L17+8 376 003c 0F48 ldr r0, .L17+12 377 003e FFF7FEFF bl USBD_HID_SendReport 378 .LVL20: 289:Src/main.c **** } 379 .loc 1 289 0 discriminator 3 380 0042 0A20 movs r0, #10 381 0044 FFF7FEFF bl HAL_Delay 382 .LVL21: 287:Src/main.c **** USBD_HID_SendReport(&hUsbDeviceFS, (uint8_t *)&kbd_report, sizeof(kbd_report)); 383 .loc 1 287 0 discriminator 3 384 0048 0134 adds r4, r4, #1 385 .LVL22: 386 .L15: 287:Src/main.c **** USBD_HID_SendReport(&hUsbDeviceFS, (uint8_t *)&kbd_report, sizeof(kbd_report)); 387 .loc 1 287 0 is_stmt 0 discriminator 1 388 004a 032C cmp r4, #3 389 004c F4DD ble .L16 291:Src/main.c **** kbd_report.modifier = 0; 390 .loc 1 291 0 is_stmt 1 391 004e 0C4C ldr r4, .L17+16 392 .LVL23: 393 0050 0622 movs r2, #6 394 0052 0021 movs r1, #0 395 0054 2000 movs r0, r4 396 0056 FFF7FEFF bl memset 397 .LVL24: 292:Src/main.c **** USBD_HID_SendReport(&hUsbDeviceFS, (uint8_t *)&kbd_report, sizeof(kbd_report)); 398 .loc 1 292 0 399 005a E11E subs r1, r4, #3 ARM GAS /tmp/ccRWo4B1.s page 17 400 005c 0023 movs r3, #0 401 005e 4B70 strb r3, [r1, #1] 293:Src/main.c **** HAL_Delay(10); 402 .loc 1 293 0 403 0060 0922 movs r2, #9 404 0062 0648 ldr r0, .L17+12 405 0064 FFF7FEFF bl USBD_HID_SendReport 406 .LVL25: 294:Src/main.c **** } 407 .loc 1 294 0 408 0068 0A20 movs r0, #10 409 006a FFF7FEFF bl HAL_Delay 410 .LVL26: 295:Src/main.c **** 411 .loc 1 295 0 412 @ sp needed 413 006e 10BD pop {r4, pc} 414 .L18: 415 .align 2 416 .L17: 417 0070 00000000 .word .LANCHOR0 418 0074 00000000 .word _asciimap 419 0078 00000000 .word kbd_report 420 007c 00000000 .word hUsbDeviceFS 421 0080 03000000 .word kbd_report+3 422 .cfi_endproc 423 .LFE44: 425 .section .text.kbd_send_raw,"ax",%progbits 426 .align 1 427 .global kbd_send_raw 428 .syntax unified 429 .code 16 430 .thumb_func 431 .fpu softvfp 433 kbd_send_raw: 434 .LFB45: 297:Src/main.c **** int code; 435 .loc 1 297 0 436 .cfi_startproc 437 @ args = 0, pretend = 0, frame = 0 438 @ frame_needed = 0, uses_anonymous_args = 0 439 .LVL27: 440 0000 10B5 push {r4, lr} 441 .LCFI7: 442 .cfi_def_cfa_offset 8 443 .cfi_offset 4, -8 444 .cfi_offset 14, -4 445 .LVL28: 305:Src/main.c **** 446 .loc 1 305 0 447 0002 174B ldr r3, .L24 448 0004 0122 movs r2, #1 449 0006 1A70 strb r2, [r3] 307:Src/main.c **** kbd_report.keycode[1]=0; 450 .loc 1 307 0 451 0008 7E32 adds r2, r2, #126 452 000a 0240 ands r2, r0 ARM GAS /tmp/ccRWo4B1.s page 18 453 000c DA70 strb r2, [r3, #3] 308:Src/main.c **** if ( code & 0x80) { // it's a capital letter or other character reached with s 454 .loc 1 308 0 455 000e 0022 movs r2, #0 456 0010 1A71 strb r2, [r3, #4] 309:Src/main.c **** kbd_report.modifier |= 0x02; // the left shift modifier 457 .loc 1 309 0 458 0012 40B2 sxtb r0, r0 459 0014 0028 cmp r0, #0 460 0016 01DB blt .L23 461 .L20: 297:Src/main.c **** int code; 462 .loc 1 297 0 discriminator 1 463 0018 0024 movs r4, #0 464 001a 0EE0 b .L21 465 .L23: 310:Src/main.c **** } 466 .loc 1 310 0 467 001c 1A00 movs r2, r3 468 001e 5B78 ldrb r3, [r3, #1] 469 0020 0221 movs r1, #2 470 0022 0B43 orrs r3, r1 471 0024 5370 strb r3, [r2, #1] 472 0026 F7E7 b .L20 473 .LVL29: 474 .L22: 313:Src/main.c **** HAL_Delay(10); 475 .loc 1 313 0 discriminator 3 476 0028 0922 movs r2, #9 477 002a 0D49 ldr r1, .L24 478 002c 0D48 ldr r0, .L24+4 479 002e FFF7FEFF bl USBD_HID_SendReport 480 .LVL30: 314:Src/main.c **** } 481 .loc 1 314 0 discriminator 3 482 0032 0A20 movs r0, #10 483 0034 FFF7FEFF bl HAL_Delay 484 .LVL31: 312:Src/main.c **** USBD_HID_SendReport(&hUsbDeviceFS, (uint8_t *)&kbd_report, sizeof(kbd_report)); 485 .loc 1 312 0 discriminator 3 486 0038 0134 adds r4, r4, #1 487 .LVL32: 488 .L21: 312:Src/main.c **** USBD_HID_SendReport(&hUsbDeviceFS, (uint8_t *)&kbd_report, sizeof(kbd_report)); 489 .loc 1 312 0 is_stmt 0 discriminator 1 490 003a 032C cmp r4, #3 491 003c F4DD ble .L22 316:Src/main.c **** kbd_report.modifier = 0; 492 .loc 1 316 0 is_stmt 1 493 003e 0A4C ldr r4, .L24+8 494 .LVL33: 495 0040 0622 movs r2, #6 496 0042 0021 movs r1, #0 497 0044 2000 movs r0, r4 498 0046 FFF7FEFF bl memset 499 .LVL34: 317:Src/main.c **** USBD_HID_SendReport(&hUsbDeviceFS, (uint8_t *)&kbd_report, sizeof(kbd_report)); ARM GAS /tmp/ccRWo4B1.s page 19 500 .loc 1 317 0 501 004a E11E subs r1, r4, #3 502 004c 0023 movs r3, #0 503 004e 4B70 strb r3, [r1, #1] 318:Src/main.c **** HAL_Delay(10); 504 .loc 1 318 0 505 0050 0922 movs r2, #9 506 0052 0448 ldr r0, .L24+4 507 0054 FFF7FEFF bl USBD_HID_SendReport 508 .LVL35: 319:Src/main.c **** } 509 .loc 1 319 0 510 0058 0A20 movs r0, #10 511 005a FFF7FEFF bl HAL_Delay 512 .LVL36: 320:Src/main.c **** 513 .loc 1 320 0 514 @ sp needed 515 005e 10BD pop {r4, pc} 516 .L25: 517 .align 2 518 .L24: 519 0060 00000000 .word kbd_report 520 0064 00000000 .word hUsbDeviceFS 521 0068 03000000 .word kbd_report+3 522 .cfi_endproc 523 .LFE45: 525 .section .text.sendVolUp,"ax",%progbits 526 .align 1 527 .global sendVolUp 528 .syntax unified 529 .code 16 530 .thumb_func 531 .fpu softvfp 533 sendVolUp: 534 .LFB46: 322:Src/main.c **** uint8_t report[3]; 535 .loc 1 322 0 536 .cfi_startproc 537 @ args = 0, pretend = 0, frame = 8 538 @ frame_needed = 0, uses_anonymous_args = 0 539 0000 F0B5 push {r4, r5, r6, r7, lr} 540 .LCFI8: 541 .cfi_def_cfa_offset 20 542 .cfi_offset 4, -20 543 .cfi_offset 5, -16 544 .cfi_offset 6, -12 545 .cfi_offset 7, -8 546 .cfi_offset 14, -4 547 0002 83B0 sub sp, sp, #12 548 .LCFI9: 549 .cfi_def_cfa_offset 32 324:Src/main.c **** report[1]= 0xE9; 550 .loc 1 324 0 551 0004 01AC add r4, sp, #4 552 0006 0227 movs r7, #2 553 0008 2770 strb r7, [r4] ARM GAS /tmp/ccRWo4B1.s page 20 325:Src/main.c **** report[2]= 0x00; 554 .loc 1 325 0 555 000a E923 movs r3, #233 556 000c 6370 strb r3, [r4, #1] 326:Src/main.c **** USBD_HID_SendReport(&hUsbDeviceFS, report, 3); 557 .loc 1 326 0 558 000e 0025 movs r5, #0 559 0010 A570 strb r5, [r4, #2] 327:Src/main.c **** HAL_Delay(10); 560 .loc 1 327 0 561 0012 094E ldr r6, .L27 562 0014 0322 movs r2, #3 563 0016 2100 movs r1, r4 564 0018 3000 movs r0, r6 565 001a FFF7FEFF bl USBD_HID_SendReport 566 .LVL37: 328:Src/main.c **** 567 .loc 1 328 0 568 001e 0A20 movs r0, #10 569 0020 FFF7FEFF bl HAL_Delay 570 .LVL38: 330:Src/main.c **** report[1]= 0x00; 571 .loc 1 330 0 572 0024 2770 strb r7, [r4] 331:Src/main.c **** report[2]= 0x00; 573 .loc 1 331 0 574 0026 6570 strb r5, [r4, #1] 332:Src/main.c **** USBD_HID_SendReport(&hUsbDeviceFS, report, 3); 575 .loc 1 332 0 576 0028 A570 strb r5, [r4, #2] 333:Src/main.c **** } 577 .loc 1 333 0 578 002a 0322 movs r2, #3 579 002c 2100 movs r1, r4 580 002e 3000 movs r0, r6 581 0030 FFF7FEFF bl USBD_HID_SendReport 582 .LVL39: 334:Src/main.c **** 583 .loc 1 334 0 584 0034 03B0 add sp, sp, #12 585 @ sp needed 586 0036 F0BD pop {r4, r5, r6, r7, pc} 587 .L28: 588 .align 2 589 .L27: 590 0038 00000000 .word hUsbDeviceFS 591 .cfi_endproc 592 .LFE46: 594 .section .text.sendVolDown,"ax",%progbits 595 .align 1 596 .global sendVolDown 597 .syntax unified 598 .code 16 599 .thumb_func 600 .fpu softvfp 602 sendVolDown: 603 .LFB47: ARM GAS /tmp/ccRWo4B1.s page 21 336:Src/main.c **** uint8_t report[3]; 604 .loc 1 336 0 605 .cfi_startproc 606 @ args = 0, pretend = 0, frame = 8 607 @ frame_needed = 0, uses_anonymous_args = 0 608 0000 F0B5 push {r4, r5, r6, r7, lr} 609 .LCFI10: 610 .cfi_def_cfa_offset 20 611 .cfi_offset 4, -20 612 .cfi_offset 5, -16 613 .cfi_offset 6, -12 614 .cfi_offset 7, -8 615 .cfi_offset 14, -4 616 0002 83B0 sub sp, sp, #12 617 .LCFI11: 618 .cfi_def_cfa_offset 32 338:Src/main.c **** report[1]= 0xEA; 619 .loc 1 338 0 620 0004 01AC add r4, sp, #4 621 0006 0227 movs r7, #2 622 0008 2770 strb r7, [r4] 339:Src/main.c **** report[2]= 0x00; 623 .loc 1 339 0 624 000a EA23 movs r3, #234 625 000c 6370 strb r3, [r4, #1] 340:Src/main.c **** USBD_HID_SendReport(&hUsbDeviceFS, report, 3); 626 .loc 1 340 0 627 000e 0025 movs r5, #0 628 0010 A570 strb r5, [r4, #2] 341:Src/main.c **** HAL_Delay(10); 629 .loc 1 341 0 630 0012 094E ldr r6, .L30 631 0014 0322 movs r2, #3 632 0016 2100 movs r1, r4 633 0018 3000 movs r0, r6 634 001a FFF7FEFF bl USBD_HID_SendReport 635 .LVL40: 342:Src/main.c **** 636 .loc 1 342 0 637 001e 0A20 movs r0, #10 638 0020 FFF7FEFF bl HAL_Delay 639 .LVL41: 344:Src/main.c **** report[1]= 0x00; 640 .loc 1 344 0 641 0024 2770 strb r7, [r4] 345:Src/main.c **** report[2]= 0x00; 642 .loc 1 345 0 643 0026 6570 strb r5, [r4, #1] 346:Src/main.c **** USBD_HID_SendReport(&hUsbDeviceFS, report, 3); 644 .loc 1 346 0 645 0028 A570 strb r5, [r4, #2] 347:Src/main.c **** } 646 .loc 1 347 0 647 002a 0322 movs r2, #3 648 002c 2100 movs r1, r4 649 002e 3000 movs r0, r6 650 0030 FFF7FEFF bl USBD_HID_SendReport ARM GAS /tmp/ccRWo4B1.s page 22 651 .LVL42: 348:Src/main.c **** 652 .loc 1 348 0 653 0034 03B0 add sp, sp, #12 654 @ sp needed 655 0036 F0BD pop {r4, r5, r6, r7, pc} 656 .L31: 657 .align 2 658 .L30: 659 0038 00000000 .word hUsbDeviceFS 660 .cfi_endproc 661 .LFE47: 663 .section .text.SystemClock_Config,"ax",%progbits 664 .align 1 665 .global SystemClock_Config 666 .syntax unified 667 .code 16 668 .thumb_func 669 .fpu softvfp 671 SystemClock_Config: 672 .LFB48: 351:Src/main.c **** RCC_OscInitTypeDef RCC_OscInitStruct = {0}; 673 .loc 1 351 0 674 .cfi_startproc 675 @ args = 0, pretend = 0, frame = 96 676 @ frame_needed = 0, uses_anonymous_args = 0 677 0000 10B5 push {r4, lr} 678 .LCFI12: 679 .cfi_def_cfa_offset 8 680 .cfi_offset 4, -8 681 .cfi_offset 14, -4 682 0002 98B0 sub sp, sp, #96 683 .LCFI13: 684 .cfi_def_cfa_offset 104 352:Src/main.c **** RCC_ClkInitTypeDef RCC_ClkInitStruct = {0}; 685 .loc 1 352 0 686 0004 3022 movs r2, #48 687 0006 0021 movs r1, #0 688 0008 0CA8 add r0, sp, #48 689 000a FFF7FEFF bl memset 690 .LVL43: 353:Src/main.c **** RCC_PeriphCLKInitTypeDef PeriphClkInit = {0}; 691 .loc 1 353 0 692 000e 1022 movs r2, #16 693 0010 0021 movs r1, #0 694 0012 07A8 add r0, sp, #28 695 0014 FFF7FEFF bl memset 696 .LVL44: 354:Src/main.c **** 697 .loc 1 354 0 698 0018 1C22 movs r2, #28 699 001a 0021 movs r1, #0 700 001c 6846 mov r0, sp 701 001e FFF7FEFF bl memset 702 .LVL45: 356:Src/main.c **** RCC_OscInitStruct.HSI48State = RCC_HSI48_ON; 703 .loc 1 356 0 ARM GAS /tmp/ccRWo4B1.s page 23 704 0022 3023 movs r3, #48 705 0024 0B93 str r3, [sp, #44] 357:Src/main.c **** RCC_OscInitStruct.HSI14State = RCC_HSI14_ON; 706 .loc 1 357 0 707 0026 2F3B subs r3, r3, #47 708 0028 1393 str r3, [sp, #76] 358:Src/main.c **** RCC_OscInitStruct.HSI14CalibrationValue = 16; 709 .loc 1 358 0 710 002a 1093 str r3, [sp, #64] 359:Src/main.c **** RCC_OscInitStruct.PLL.PLLState = RCC_PLL_NONE; 711 .loc 1 359 0 712 002c 0F33 adds r3, r3, #15 713 002e 1193 str r3, [sp, #68] 361:Src/main.c **** 714 .loc 1 361 0 715 0030 0BA8 add r0, sp, #44 716 0032 FFF7FEFF bl HAL_RCC_OscConfig 717 .LVL46: 363:Src/main.c **** |RCC_CLOCKTYPE_PCLK1; 718 .loc 1 363 0 719 0036 0723 movs r3, #7 720 0038 0793 str r3, [sp, #28] 365:Src/main.c **** RCC_ClkInitStruct.AHBCLKDivider = RCC_SYSCLK_DIV1; 721 .loc 1 365 0 722 003a 043B subs r3, r3, #4 723 003c 0893 str r3, [sp, #32] 366:Src/main.c **** RCC_ClkInitStruct.APB1CLKDivider = RCC_HCLK_DIV1; 724 .loc 1 366 0 725 003e 0024 movs r4, #0 726 0040 0994 str r4, [sp, #36] 367:Src/main.c **** HAL_RCC_ClockConfig(&RCC_ClkInitStruct, FLASH_LATENCY_1); 727 .loc 1 367 0 728 0042 0A94 str r4, [sp, #40] 368:Src/main.c **** 729 .loc 1 368 0 730 0044 0121 movs r1, #1 731 0046 07A8 add r0, sp, #28 732 0048 FFF7FEFF bl HAL_RCC_ClockConfig 733 .LVL47: 370:Src/main.c **** PeriphClkInit.UsbClockSelection = RCC_USBCLKSOURCE_HSI48; 734 .loc 1 370 0 735 004c 8023 movs r3, #128 736 004e 9B02 lsls r3, r3, #10 737 0050 0093 str r3, [sp] 371:Src/main.c **** HAL_RCCEx_PeriphCLKConfig(&PeriphClkInit); 738 .loc 1 371 0 739 0052 0694 str r4, [sp, #24] 372:Src/main.c **** 740 .loc 1 372 0 741 0054 6846 mov r0, sp 742 0056 FFF7FEFF bl HAL_RCCEx_PeriphCLKConfig 743 .LVL48: 374:Src/main.c **** 744 .loc 1 374 0 745 005a 18B0 add sp, sp, #96 746 @ sp needed 747 005c 10BD pop {r4, pc} ARM GAS /tmp/ccRWo4B1.s page 24 748 .cfi_endproc 749 .LFE48: 751 .section .text.main,"ax",%progbits 752 .align 1 753 .global main 754 .syntax unified 755 .code 16 756 .thumb_func 757 .fpu softvfp 759 main: 760 .LFB43: 37:Src/main.c **** HAL_Init(); 761 .loc 1 37 0 762 .cfi_startproc 763 @ args = 0, pretend = 0, frame = 0 764 @ frame_needed = 0, uses_anonymous_args = 0 765 0000 10B5 push {r4, lr} 766 .LCFI14: 767 .cfi_def_cfa_offset 8 768 .cfi_offset 4, -8 769 .cfi_offset 14, -4 38:Src/main.c **** 770 .loc 1 38 0 771 0002 FFF7FEFF bl HAL_Init 772 .LVL49: 40:Src/main.c **** 773 .loc 1 40 0 774 0006 FFF7FEFF bl SystemClock_Config 775 .LVL50: 42:Src/main.c **** MX_DMA_Init(); 776 .loc 1 42 0 777 000a FFF7FEFF bl MX_GPIO_Init 778 .LVL51: 43:Src/main.c **** MX_ADC_Init(); 779 .loc 1 43 0 780 000e FFF7FEFF bl MX_DMA_Init 781 .LVL52: 44:Src/main.c **** MX_USB_HID_INIT(); 782 .loc 1 44 0 783 0012 FFF7FEFF bl MX_ADC_Init 784 .LVL53: 45:Src/main.c **** 785 .loc 1 45 0 786 0016 FFF7FEFF bl MX_USB_HID_INIT 787 .LVL54: 47:Src/main.c **** 788 .loc 1 47 0 789 001a 0822 movs r2, #8 790 001c 5F49 ldr r1, .L64 791 001e 6048 ldr r0, .L64+4 792 0020 FFF7FEFF bl HAL_ADC_Start_DMA 793 .LVL55: 794 0024 5AE0 b .L50 795 .LVL56: 796 .L35: 797 .LBB5: 55:Src/main.c **** } ARM GAS /tmp/ccRWo4B1.s page 25 798 .loc 1 55 0 discriminator 3 799 0026 5300 lsls r3, r2, #1 800 0028 5E48 ldr r0, .L64+8 801 002a 1952 strh r1, [r3, r0] 802 .L36: 53:Src/main.c **** ADCval[i] = ADCreg[i]; 803 .loc 1 53 0 discriminator 2 804 002c 0132 adds r2, r2, #1 805 .LVL57: 806 .L34: 53:Src/main.c **** ADCval[i] = ADCreg[i]; 807 .loc 1 53 0 is_stmt 0 discriminator 1 808 002e 072A cmp r2, #7 809 0030 0FDC bgt .L51 54:Src/main.c **** if(ADCval[i] - ADClast[i] > 2000 || ADClast[i] - ADCval[i] > 2000 ) ADClast[i] = ADCval[i]; 810 .loc 1 54 0 is_stmt 1 811 0032 5300 lsls r3, r2, #1 812 0034 5949 ldr r1, .L64 813 0036 595A ldrh r1, [r3, r1] 814 0038 5B48 ldr r0, .L64+12 815 003a 1952 strh r1, [r3, r0] 55:Src/main.c **** } 816 .loc 1 55 0 817 003c 5948 ldr r0, .L64+8 818 003e 1B5A ldrh r3, [r3, r0] 819 0040 CC1A subs r4, r1, r3 820 0042 FA20 movs r0, #250 821 0044 C000 lsls r0, r0, #3 822 0046 8442 cmp r4, r0 823 0048 EDDC bgt .L35 55:Src/main.c **** } 824 .loc 1 55 0 is_stmt 0 discriminator 2 825 004a 5B1A subs r3, r3, r1 826 004c 8342 cmp r3, r0 827 004e EDDD ble .L36 828 0050 E9E7 b .L35 829 .L51: 830 .LBE5: 59:Src/main.c **** sendVolUp(); 831 .loc 1 59 0 is_stmt 1 832 0052 554B ldr r3, .L64+12 833 0054 1A88 ldrh r2, [r3] 834 .LVL58: 835 0056 534B ldr r3, .L64+8 836 0058 1B88 ldrh r3, [r3] 837 005a 1900 movs r1, r3 838 005c C831 adds r1, r1, #200 839 005e 8A42 cmp r2, r1 840 0060 3EDA bge .L52 62:Src/main.c **** sendVolDown(); 841 .loc 1 62 0 842 0062 C83B subs r3, r3, #200 843 0064 9A42 cmp r2, r3 844 0066 42DD ble .L53 845 .L39: 73:Src/main.c **** kbd_send_ch('v'); 846 .loc 1 73 0 ARM GAS /tmp/ccRWo4B1.s page 26 847 0068 4F4B ldr r3, .L64+12 848 006a 9A88 ldrh r2, [r3, #4] 849 006c 4D4B ldr r3, .L64+8 850 006e 9B88 ldrh r3, [r3, #4] 851 0070 1900 movs r1, r3 852 0072 C831 adds r1, r1, #200 853 0074 8A42 cmp r2, r1 854 0076 41DA bge .L54 76:Src/main.c **** kbd_send_ch('v'); 855 .loc 1 76 0 856 0078 C83B subs r3, r3, #200 857 007a 9A42 cmp r2, r3 858 007c 46DD ble .L55 859 .L41: 82:Src/main.c **** kbd_send_ch('R'); 860 .loc 1 82 0 861 007e 4A4B ldr r3, .L64+12 862 0080 DA88 ldrh r2, [r3, #6] 863 0082 484B ldr r3, .L64+8 864 0084 DB88 ldrh r3, [r3, #6] 865 0086 1900 movs r1, r3 866 0088 C831 adds r1, r1, #200 867 008a 8A42 cmp r2, r1 868 008c 46DA bge .L56 85:Src/main.c **** kbd_send_ch('r'); 869 .loc 1 85 0 870 008e C83B subs r3, r3, #200 871 0090 9A42 cmp r2, r3 872 0092 4BDD ble .L57 873 .L43: 91:Src/main.c **** kbd_send_ch('n'); 874 .loc 1 91 0 875 0094 444B ldr r3, .L64+12 876 0096 1A89 ldrh r2, [r3, #8] 877 0098 424B ldr r3, .L64+8 878 009a 1B89 ldrh r3, [r3, #8] 879 009c 1900 movs r1, r3 880 009e C831 adds r1, r1, #200 881 00a0 8A42 cmp r2, r1 882 00a2 4BDA bge .L58 94:Src/main.c **** kbd_send_ch('N'); 883 .loc 1 94 0 884 00a4 C83B subs r3, r3, #200 885 00a6 9A42 cmp r2, r3 886 00a8 50DD ble .L59 887 .L45: 105:Src/main.c **** kbd_send_ch('w'); 888 .loc 1 105 0 889 00aa 3F4B ldr r3, .L64+12 890 00ac 9A89 ldrh r2, [r3, #12] 891 00ae 3D4B ldr r3, .L64+8 892 00b0 9B89 ldrh r3, [r3, #12] 893 00b2 1900 movs r1, r3 894 00b4 C831 adds r1, r1, #200 895 00b6 8A42 cmp r2, r1 896 00b8 50DA bge .L60 108:Src/main.c **** kbd_send_ch('W'); ARM GAS /tmp/ccRWo4B1.s page 27 897 .loc 1 108 0 898 00ba C83B subs r3, r3, #200 899 00bc 9A42 cmp r2, r3 900 00be 55DD ble .L61 901 .L47: 114:Src/main.c **** kbd_send_raw(0x3a); 902 .loc 1 114 0 903 00c0 394B ldr r3, .L64+12 904 00c2 DA89 ldrh r2, [r3, #14] 905 00c4 374B ldr r3, .L64+8 906 00c6 DB89 ldrh r3, [r3, #14] 907 00c8 1900 movs r1, r3 908 00ca C831 adds r1, r1, #200 909 00cc 8A42 cmp r2, r1 910 00ce 55DA bge .L62 117:Src/main.c **** kbd_send_raw(0x3b); 911 .loc 1 117 0 912 00d0 C83B subs r3, r3, #200 913 00d2 9A42 cmp r2, r3 914 00d4 5ADD ble .L63 915 .L49: 126:Src/main.c **** } 916 .loc 1 126 0 917 00d6 0A20 movs r0, #10 918 00d8 FFF7FEFF bl HAL_Delay 919 .LVL59: 920 .L50: 921 .LBB6: 53:Src/main.c **** ADCval[i] = ADCreg[i]; 922 .loc 1 53 0 923 00dc 0022 movs r2, #0 924 00de A6E7 b .L34 925 .LVL60: 926 .L52: 927 .LBE6: 60:Src/main.c **** ADClast[0] = ADCval[0]; 928 .loc 1 60 0 929 00e0 FFF7FEFF bl sendVolUp 930 .LVL61: 61:Src/main.c **** } else if(ADCval[0] <= ADClast[0] - HYSTERESIS){ 931 .loc 1 61 0 932 00e4 304B ldr r3, .L64+12 933 00e6 1A88 ldrh r2, [r3] 934 00e8 2E4B ldr r3, .L64+8 935 00ea 1A80 strh r2, [r3] 936 00ec BCE7 b .L39 937 .L53: 63:Src/main.c **** ADClast[0] = ADCval[0]; 938 .loc 1 63 0 939 00ee FFF7FEFF bl sendVolDown 940 .LVL62: 64:Src/main.c **** } 941 .loc 1 64 0 942 00f2 2D4B ldr r3, .L64+12 943 00f4 1A88 ldrh r2, [r3] 944 00f6 2B4B ldr r3, .L64+8 945 00f8 1A80 strh r2, [r3] ARM GAS /tmp/ccRWo4B1.s page 28 946 00fa B5E7 b .L39 947 .L54: 948 .LBB7: 74:Src/main.c **** ADClast[2] = ADCval[2]; 949 .loc 1 74 0 950 00fc 7620 movs r0, #118 951 00fe FFF7FEFF bl kbd_send_ch 952 .LVL63: 75:Src/main.c **** } else if(ADCval[2] <= ADClast[2] - HYSTERESIS){ 953 .loc 1 75 0 954 0102 294B ldr r3, .L64+12 955 0104 9A88 ldrh r2, [r3, #4] 956 0106 274B ldr r3, .L64+8 957 0108 9A80 strh r2, [r3, #4] 958 .LBE7: 959 010a B8E7 b .L41 960 .L55: 961 .LBB8: 77:Src/main.c **** ADClast[2] = ADCval[2]; 962 .loc 1 77 0 963 010c 7620 movs r0, #118 964 010e FFF7FEFF bl kbd_send_ch 965 .LVL64: 78:Src/main.c **** } 966 .loc 1 78 0 967 0112 254B ldr r3, .L64+12 968 0114 9A88 ldrh r2, [r3, #4] 969 0116 234B ldr r3, .L64+8 970 0118 9A80 strh r2, [r3, #4] 971 011a B0E7 b .L41 972 .L56: 973 .LBE8: 974 .LBB9: 83:Src/main.c **** ADClast[3] = ADCval[3]; 975 .loc 1 83 0 976 011c 5220 movs r0, #82 977 011e FFF7FEFF bl kbd_send_ch 978 .LVL65: 84:Src/main.c **** } else if(ADCval[3] <= ADClast[3] - HYSTERESIS){ 979 .loc 1 84 0 980 0122 214B ldr r3, .L64+12 981 0124 DA88 ldrh r2, [r3, #6] 982 0126 1F4B ldr r3, .L64+8 983 0128 DA80 strh r2, [r3, #6] 984 .LBE9: 985 012a B3E7 b .L43 986 .L57: 987 .LBB10: 86:Src/main.c **** ADClast[3] = ADCval[3]; 988 .loc 1 86 0 989 012c 7220 movs r0, #114 990 012e FFF7FEFF bl kbd_send_ch 991 .LVL66: 87:Src/main.c **** } 992 .loc 1 87 0 993 0132 1D4B ldr r3, .L64+12 994 0134 DA88 ldrh r2, [r3, #6] ARM GAS /tmp/ccRWo4B1.s page 29 995 0136 1B4B ldr r3, .L64+8 996 0138 DA80 strh r2, [r3, #6] 997 013a ABE7 b .L43 998 .L58: 999 .LBE10: 1000 .LBB11: 92:Src/main.c **** ADClast[4] = ADCval[4]; 1001 .loc 1 92 0 1002 013c 6E20 movs r0, #110 1003 013e FFF7FEFF bl kbd_send_ch 1004 .LVL67: 93:Src/main.c **** } else if(ADCval[4] <= ADClast[4] - HYSTERESIS){ 1005 .loc 1 93 0 1006 0142 194B ldr r3, .L64+12 1007 0144 1A89 ldrh r2, [r3, #8] 1008 0146 174B ldr r3, .L64+8 1009 0148 1A81 strh r2, [r3, #8] 1010 .LBE11: 1011 014a AEE7 b .L45 1012 .L59: 1013 .LBB12: 95:Src/main.c **** ADClast[4] = ADCval[4]; 1014 .loc 1 95 0 1015 014c 4E20 movs r0, #78 1016 014e FFF7FEFF bl kbd_send_ch 1017 .LVL68: 96:Src/main.c **** } 1018 .loc 1 96 0 1019 0152 154B ldr r3, .L64+12 1020 0154 1A89 ldrh r2, [r3, #8] 1021 0156 134B ldr r3, .L64+8 1022 0158 1A81 strh r2, [r3, #8] 1023 015a A6E7 b .L45 1024 .L60: 1025 .LBE12: 1026 .LBB13: 106:Src/main.c **** ADClast[6] = ADCval[6]; 1027 .loc 1 106 0 1028 015c 7720 movs r0, #119 1029 015e FFF7FEFF bl kbd_send_ch 1030 .LVL69: 107:Src/main.c **** } else if(ADCval[6] <= ADClast[6] - HYSTERESIS){ 1031 .loc 1 107 0 1032 0162 114B ldr r3, .L64+12 1033 0164 9A89 ldrh r2, [r3, #12] 1034 0166 0F4B ldr r3, .L64+8 1035 0168 9A81 strh r2, [r3, #12] 1036 .LBE13: 1037 016a A9E7 b .L47 1038 .L61: 1039 .LBB14: 109:Src/main.c **** ADClast[6] = ADCval[6]; 1040 .loc 1 109 0 1041 016c 5720 movs r0, #87 1042 016e FFF7FEFF bl kbd_send_ch 1043 .LVL70: 110:Src/main.c **** } ARM GAS /tmp/ccRWo4B1.s page 30 1044 .loc 1 110 0 1045 0172 0D4B ldr r3, .L64+12 1046 0174 9A89 ldrh r2, [r3, #12] 1047 0176 0B4B ldr r3, .L64+8 1048 0178 9A81 strh r2, [r3, #12] 1049 017a A1E7 b .L47 1050 .L62: 1051 .LBE14: 1052 .LBB15: 115:Src/main.c **** ADClast[7] = ADCval[7]; 1053 .loc 1 115 0 1054 017c 3A20 movs r0, #58 1055 017e FFF7FEFF bl kbd_send_raw 1056 .LVL71: 116:Src/main.c **** } else if(ADCval[7] <= ADClast[7] - HYSTERESIS){ 1057 .loc 1 116 0 1058 0182 094B ldr r3, .L64+12 1059 0184 DA89 ldrh r2, [r3, #14] 1060 0186 074B ldr r3, .L64+8 1061 0188 DA81 strh r2, [r3, #14] 1062 .LBE15: 1063 018a A4E7 b .L49 1064 .L63: 1065 .LBB16: 118:Src/main.c **** ADClast[7] = ADCval[7]; 1066 .loc 1 118 0 1067 018c 3B20 movs r0, #59 1068 018e FFF7FEFF bl kbd_send_raw 1069 .LVL72: 119:Src/main.c **** } 1070 .loc 1 119 0 1071 0192 054B ldr r3, .L64+12 1072 0194 DA89 ldrh r2, [r3, #14] 1073 0196 034B ldr r3, .L64+8 1074 0198 DA81 strh r2, [r3, #14] 1075 019a 9CE7 b .L49 1076 .L65: 1077 .align 2 1078 .L64: 1079 019c 00000000 .word ADCreg 1080 01a0 00000000 .word hadc 1081 01a4 00000000 .word ADClast 1082 01a8 00000000 .word ADCval 1083 .LBE16: 1084 .cfi_endproc 1085 .LFE43: 1087 .section .text.Error_Handler,"ax",%progbits 1088 .align 1 1089 .global Error_Handler 1090 .syntax unified 1091 .code 16 1092 .thumb_func 1093 .fpu softvfp 1095 Error_Handler: 1096 .LFB53: 463:Src/main.c **** 464:Src/main.c **** void Error_Handler(void) ARM GAS /tmp/ccRWo4B1.s page 31 465:Src/main.c **** { 1097 .loc 1 465 0 1098 .cfi_startproc 1099 @ Volatile: function does not return. 1100 @ args = 0, pretend = 0, frame = 0 1101 @ frame_needed = 0, uses_anonymous_args = 0 1102 0000 70B5 push {r4, r5, r6, lr} 1103 .LCFI15: 1104 .cfi_def_cfa_offset 16 1105 .cfi_offset 4, -16 1106 .cfi_offset 5, -12 1107 .cfi_offset 6, -8 1108 .cfi_offset 14, -4 1109 .L67: 466:Src/main.c **** while(1){ 467:Src/main.c **** HAL_GPIO_WritePin(GPIOB,GPIO_PIN_13,1); 1110 .loc 1 467 0 discriminator 1 1111 0002 8025 movs r5, #128 1112 0004 AD01 lsls r5, r5, #6 1113 0006 094C ldr r4, .L68 1114 0008 0122 movs r2, #1 1115 000a 2900 movs r1, r5 1116 000c 2000 movs r0, r4 1117 000e FFF7FEFF bl HAL_GPIO_WritePin 1118 .LVL73: 468:Src/main.c **** HAL_Delay(100); 1119 .loc 1 468 0 discriminator 1 1120 0012 6420 movs r0, #100 1121 0014 FFF7FEFF bl HAL_Delay 1122 .LVL74: 469:Src/main.c **** HAL_GPIO_WritePin(GPIOB,GPIO_PIN_13,0); 1123 .loc 1 469 0 discriminator 1 1124 0018 0022 movs r2, #0 1125 001a 2900 movs r1, r5 1126 001c 2000 movs r0, r4 1127 001e FFF7FEFF bl HAL_GPIO_WritePin 1128 .LVL75: 470:Src/main.c **** HAL_Delay(100); 1129 .loc 1 470 0 discriminator 1 1130 0022 6420 movs r0, #100 1131 0024 FFF7FEFF bl HAL_Delay 1132 .LVL76: 1133 0028 EBE7 b .L67 1134 .L69: 1135 002a C046 .align 2 1136 .L68: 1137 002c 00040048 .word 1207960576 1138 .cfi_endproc 1139 .LFE53: 1141 .global scan_cvt 1142 .global _asciimap 1143 .comm ADClast,16,4 1144 .comm ADCval,16,4 1145 .comm ADCreg,16,4 1146 .comm kbd_report,9,4 1147 .comm hpcd_USB_FS,628,4 1148 .comm hdma_adc,68,4 ARM GAS /tmp/ccRWo4B1.s page 32 1149 .comm hadc,64,4 1150 .section .data.scan_cvt,"aw",%progbits 1151 .align 2 1152 .set .LANCHOR0,. + 0 1155 scan_cvt: 1156 0000 01000000 .word 1 1157 .section .rodata._asciimap,"a",%progbits 1158 .align 2 1161 _asciimap: 1162 0000 00 .byte 0 1163 0001 00 .byte 0 1164 0002 00 .byte 0 1165 0003 00 .byte 0 1166 0004 00 .byte 0 1167 0005 00 .byte 0 1168 0006 00 .byte 0 1169 0007 00 .byte 0 1170 0008 2A .byte 42 1171 0009 2B .byte 43 1172 000a 28 .byte 40 1173 000b 00 .byte 0 1174 000c 00 .byte 0 1175 000d 00 .byte 0 1176 000e 00 .byte 0 1177 000f 00 .byte 0 1178 0010 00 .byte 0 1179 0011 00 .byte 0 1180 0012 00 .byte 0 1181 0013 00 .byte 0 1182 0014 00 .byte 0 1183 0015 00 .byte 0 1184 0016 00 .byte 0 1185 0017 00 .byte 0 1186 0018 00 .byte 0 1187 0019 00 .byte 0 1188 001a 00 .byte 0 1189 001b 00 .byte 0 1190 001c 00 .byte 0 1191 001d 00 .byte 0 1192 001e 00 .byte 0 1193 001f 00 .byte 0 1194 0020 2C .byte 44 1195 0021 9E .byte -98 1196 0022 B4 .byte -76 1197 0023 A0 .byte -96 1198 0024 A1 .byte -95 1199 0025 A2 .byte -94 1200 0026 A4 .byte -92 1201 0027 34 .byte 52 1202 0028 A6 .byte -90 1203 0029 A7 .byte -89 1204 002a A5 .byte -91 1205 002b AE .byte -82 1206 002c 36 .byte 54 1207 002d 2D .byte 45 1208 002e 37 .byte 55 1209 002f 38 .byte 56 ARM GAS /tmp/ccRWo4B1.s page 33 1210 0030 27 .byte 39 1211 0031 1E .byte 30 1212 0032 1F .byte 31 1213 0033 20 .byte 32 1214 0034 21 .byte 33 1215 0035 22 .byte 34 1216 0036 23 .byte 35 1217 0037 24 .byte 36 1218 0038 25 .byte 37 1219 0039 26 .byte 38 1220 003a B3 .byte -77 1221 003b 33 .byte 51 1222 003c B6 .byte -74 1223 003d 2E .byte 46 1224 003e B7 .byte -73 1225 003f B8 .byte -72 1226 0040 9F .byte -97 1227 0041 84 .byte -124 1228 0042 85 .byte -123 1229 0043 86 .byte -122 1230 0044 87 .byte -121 1231 0045 88 .byte -120 1232 0046 89 .byte -119 1233 0047 8A .byte -118 1234 0048 8B .byte -117 1235 0049 8C .byte -116 1236 004a 8D .byte -115 1237 004b 8E .byte -114 1238 004c 8F .byte -113 1239 004d 90 .byte -112 1240 004e 91 .byte -111 1241 004f 92 .byte -110 1242 0050 93 .byte -109 1243 0051 94 .byte -108 1244 0052 95 .byte -107 1245 0053 96 .byte -106 1246 0054 97 .byte -105 1247 0055 98 .byte -104 1248 0056 99 .byte -103 1249 0057 9A .byte -102 1250 0058 9B .byte -101 1251 0059 9C .byte -100 1252 005a 9D .byte -99 1253 005b 2F .byte 47 1254 005c 31 .byte 49 1255 005d 30 .byte 48 1256 005e A3 .byte -93 1257 005f AD .byte -83 1258 0060 35 .byte 53 1259 0061 04 .byte 4 1260 0062 05 .byte 5 1261 0063 06 .byte 6 1262 0064 07 .byte 7 1263 0065 08 .byte 8 1264 0066 09 .byte 9 1265 0067 0A .byte 10 1266 0068 0B .byte 11 ARM GAS /tmp/ccRWo4B1.s page 34 1267 0069 0C .byte 12 1268 006a 0D .byte 13 1269 006b 0E .byte 14 1270 006c 0F .byte 15 1271 006d 10 .byte 16 1272 006e 11 .byte 17 1273 006f 12 .byte 18 1274 0070 13 .byte 19 1275 0071 14 .byte 20 1276 0072 15 .byte 21 1277 0073 16 .byte 22 1278 0074 17 .byte 23 1279 0075 18 .byte 24 1280 0076 19 .byte 25 1281 0077 1A .byte 26 1282 0078 1B .byte 27 1283 0079 1C .byte 28 1284 007a 1D .byte 29 1285 007b AF .byte -81 1286 007c B1 .byte -79 1287 007d B0 .byte -80 1288 007e B5 .byte -75 1289 007f 00 .byte 0 1290 .text 1291 .Letext0: 1292 .file 2 "/home/janhenrik/programme/gcc-arm-none-eabi-7-2018-q2-update/arm-none-eabi/include/machin 1293 .file 3 "/home/janhenrik/programme/gcc-arm-none-eabi-7-2018-q2-update/arm-none-eabi/include/sys/_s 1294 .file 4 "Drivers/CMSIS/Device/ST/STM32F0xx/Include/system_stm32f0xx.h" 1295 .file 5 "Drivers/CMSIS/Device/ST/STM32F0xx/Include/stm32f072xb.h" 1296 .file 6 "Drivers/CMSIS/Device/ST/STM32F0xx/Include/stm32f0xx.h" 1297 .file 7 "Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_hal_def.h" 1298 .file 8 "Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_hal_rcc.h" 1299 .file 9 "Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_hal_rcc_ex.h" 1300 .file 10 "Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_hal_gpio.h" 1301 .file 11 "Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_hal_dma.h" 1302 .file 12 "Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_hal_adc.h" 1303 .file 13 "Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_ll_usb.h" 1304 .file 14 "Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_hal_pcd.h" 1305 .file 15 "Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_hal.h" 1306 .file 16 "/home/janhenrik/programme/gcc-arm-none-eabi-7-2018-q2-update/arm-none-eabi/include/sys/l 1307 .file 17 "/home/janhenrik/programme/gcc-arm-none-eabi-7-2018-q2-update/arm-none-eabi/include/sys/_ 1308 .file 18 "/home/janhenrik/programme/gcc-arm-none-eabi-7-2018-q2-update/lib/gcc/arm-none-eabi/7.3.1 1309 .file 19 "/home/janhenrik/programme/gcc-arm-none-eabi-7-2018-q2-update/arm-none-eabi/include/sys/r 1310 .file 20 "/home/janhenrik/programme/gcc-arm-none-eabi-7-2018-q2-update/arm-none-eabi/include/stdli 1311 .file 21 "Middlewares/ST/STM32_USB_Device_Library/Core/Inc/usbd_def.h" 1312 .file 22 "Inc/usb_device.h" 1313 .file 23 "Inc/usbd_hid.h" 1314 .file 24 "Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_hal_cortex.h" 1315 .file 25 "" ARM GAS /tmp/ccRWo4B1.s page 35 DEFINED SYMBOLS *ABS*:0000000000000000 main.c /tmp/ccRWo4B1.s:16 .text.MX_GPIO_Init:0000000000000000 $t /tmp/ccRWo4B1.s:22 .text.MX_GPIO_Init:0000000000000000 MX_GPIO_Init /tmp/ccRWo4B1.s:100 .text.MX_GPIO_Init:000000000000005c $d /tmp/ccRWo4B1.s:106 .text.MX_DMA_Init:0000000000000000 $t /tmp/ccRWo4B1.s:112 .text.MX_DMA_Init:0000000000000000 MX_DMA_Init /tmp/ccRWo4B1.s:154 .text.MX_DMA_Init:000000000000002c $d /tmp/ccRWo4B1.s:159 .text.MX_ADC_Init:0000000000000000 $t /tmp/ccRWo4B1.s:165 .text.MX_ADC_Init:0000000000000000 MX_ADC_Init /tmp/ccRWo4B1.s:303 .text.MX_ADC_Init:00000000000000a8 $d *COM*:0000000000000040 hadc /tmp/ccRWo4B1.s:309 .text.kbd_send_ch:0000000000000000 $t /tmp/ccRWo4B1.s:316 .text.kbd_send_ch:0000000000000000 kbd_send_ch /tmp/ccRWo4B1.s:417 .text.kbd_send_ch:0000000000000070 $d /tmp/ccRWo4B1.s:1161 .rodata._asciimap:0000000000000000 _asciimap *COM*:0000000000000009 kbd_report /tmp/ccRWo4B1.s:426 .text.kbd_send_raw:0000000000000000 $t /tmp/ccRWo4B1.s:433 .text.kbd_send_raw:0000000000000000 kbd_send_raw /tmp/ccRWo4B1.s:519 .text.kbd_send_raw:0000000000000060 $d /tmp/ccRWo4B1.s:526 .text.sendVolUp:0000000000000000 $t /tmp/ccRWo4B1.s:533 .text.sendVolUp:0000000000000000 sendVolUp /tmp/ccRWo4B1.s:590 .text.sendVolUp:0000000000000038 $d /tmp/ccRWo4B1.s:595 .text.sendVolDown:0000000000000000 $t /tmp/ccRWo4B1.s:602 .text.sendVolDown:0000000000000000 sendVolDown /tmp/ccRWo4B1.s:659 .text.sendVolDown:0000000000000038 $d /tmp/ccRWo4B1.s:664 .text.SystemClock_Config:0000000000000000 $t /tmp/ccRWo4B1.s:671 .text.SystemClock_Config:0000000000000000 SystemClock_Config /tmp/ccRWo4B1.s:752 .text.main:0000000000000000 $t /tmp/ccRWo4B1.s:759 .text.main:0000000000000000 main /tmp/ccRWo4B1.s:1079 .text.main:000000000000019c $d *COM*:0000000000000010 ADCreg *COM*:0000000000000010 ADClast *COM*:0000000000000010 ADCval /tmp/ccRWo4B1.s:1088 .text.Error_Handler:0000000000000000 $t /tmp/ccRWo4B1.s:1095 .text.Error_Handler:0000000000000000 Error_Handler /tmp/ccRWo4B1.s:1137 .text.Error_Handler:000000000000002c $d /tmp/ccRWo4B1.s:1155 .data.scan_cvt:0000000000000000 scan_cvt *COM*:0000000000000274 hpcd_USB_FS *COM*:0000000000000044 hdma_adc /tmp/ccRWo4B1.s:1151 .data.scan_cvt:0000000000000000 $d /tmp/ccRWo4B1.s:1158 .rodata._asciimap:0000000000000000 $d UNDEFINED SYMBOLS memset HAL_GPIO_WritePin HAL_GPIO_Init HAL_NVIC_SetPriority HAL_NVIC_EnableIRQ HAL_ADC_Init HAL_ADC_ConfigChannel USBD_HID_SendReport HAL_Delay hUsbDeviceFS HAL_RCC_OscConfig HAL_RCC_ClockConfig HAL_RCCEx_PeriphCLKConfig ARM GAS /tmp/ccRWo4B1.s page 36 HAL_Init MX_USB_HID_INIT HAL_ADC_Start_DMA