non-c99 compatibility
This commit is contained in:
parent
83d59dfc54
commit
3d9dd08208
13
fido2/ctap.c
13
fido2/ctap.c
@ -1,21 +1,21 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (C) 2018 SoloKeys, Inc. <https://solokeys.com/>
|
* Copyright (C) 2018 SoloKeys, Inc. <https://solokeys.com/>
|
||||||
*
|
*
|
||||||
* This file is part of Solo.
|
* This file is part of Solo.
|
||||||
*
|
*
|
||||||
* Solo is free software: you can redistribute it and/or modify
|
* Solo is free software: you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
* the Free Software Foundation, either version 3 of the License, or
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
* (at your option) any later version.
|
* (at your option) any later version.
|
||||||
*
|
*
|
||||||
* Solo is distributed in the hope that it will be useful,
|
* Solo is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
* GNU General Public License for more details.
|
* GNU General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with Solo. If not, see <https://www.gnu.org/licenses/>
|
* along with Solo. If not, see <https://www.gnu.org/licenses/>
|
||||||
*
|
*
|
||||||
* This code is available under licenses for commercial use.
|
* This code is available under licenses for commercial use.
|
||||||
* Please contact SoloKeys for more information.
|
* Please contact SoloKeys for more information.
|
||||||
*/
|
*/
|
||||||
@ -1030,7 +1030,8 @@ uint8_t ctap_get_assertion(CborEncoder * encoder, uint8_t * request, int length)
|
|||||||
}
|
}
|
||||||
|
|
||||||
printf1(TAG_GA,"resulting order of creds:\n");
|
printf1(TAG_GA,"resulting order of creds:\n");
|
||||||
for (int j = 0; j < GA.credLen; j++)
|
int j;
|
||||||
|
for (j = 0; j < GA.credLen; j++)
|
||||||
{
|
{
|
||||||
printf1(TAG_GA,"CRED ID (# %d)\n", GA.creds[j].credential.id.count);
|
printf1(TAG_GA,"CRED ID (# %d)\n", GA.creds[j].credential.id.count);
|
||||||
}
|
}
|
||||||
|
@ -213,7 +213,7 @@ static uint8_t USBD_Composite_Init (USBD_HandleTypeDef *pdev, uint8_t cfgidx) {
|
|||||||
|
|
||||||
static uint8_t USBD_Composite_DeInit (USBD_HandleTypeDef *pdev, uint8_t cfgidx) {
|
static uint8_t USBD_Composite_DeInit (USBD_HandleTypeDef *pdev, uint8_t cfgidx) {
|
||||||
int i;
|
int i;
|
||||||
for(int i = 0; i < NUM_INTERFACES; i++) {
|
for(i = 0; i < NUM_INTERFACES; i++) {
|
||||||
if (USBD_Classes[i]->DeInit(pdev, cfgidx) != USBD_OK) {
|
if (USBD_Classes[i]->DeInit(pdev, cfgidx) != USBD_OK) {
|
||||||
return USBD_FAIL;
|
return USBD_FAIL;
|
||||||
}
|
}
|
||||||
|
@ -250,38 +250,38 @@ void usb_hid_recieve_callback(uint8_t ep)
|
|||||||
HID_PACKET_SIZE);
|
HID_PACKET_SIZE);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void dump_pma()
|
// static void dump_pma()
|
||||||
{
|
// {
|
||||||
|
//
|
||||||
register uint32_t _wRegBase = (uint32_t)USB;
|
// register uint32_t _wRegBase = (uint32_t)USB;
|
||||||
_wRegBase += (uint32_t)(USB)->BTABLE + 0x400;
|
// _wRegBase += (uint32_t)(USB)->BTABLE + 0x400;
|
||||||
|
//
|
||||||
uint16_t * pma_ptr = (uint16_t *)_wRegBase;
|
// uint16_t * pma_ptr = (uint16_t *)_wRegBase;
|
||||||
uint16_t val;
|
// uint16_t val;
|
||||||
uint32_t offset = (uint32_t)(USB)->BTABLE;
|
// uint32_t offset = (uint32_t)(USB)->BTABLE;
|
||||||
|
//
|
||||||
printf1(TAG_GREEN,"btable: %02lx\r\n",offset);
|
// printf1(TAG_GREEN,"btable: %02lx\r\n",offset);
|
||||||
|
//
|
||||||
for (int i = 0; i < 2; i++)
|
// for (int i = 0; i < 2; i++)
|
||||||
{
|
// {
|
||||||
uint16_t addr_tx = pma_ptr[i * 4 + 0];
|
// uint16_t addr_tx = pma_ptr[i * 4 + 0];
|
||||||
uint16_t cnt_tx = pma_ptr[i * 4 + 1];
|
// uint16_t cnt_tx = pma_ptr[i * 4 + 1];
|
||||||
uint16_t addr_rx = pma_ptr[i * 4 + 2];
|
// uint16_t addr_rx = pma_ptr[i * 4 + 2];
|
||||||
uint16_t cnt_rx = pma_ptr[i * 4 + 3];
|
// uint16_t cnt_rx = pma_ptr[i * 4 + 3];
|
||||||
|
//
|
||||||
printf1(TAG_GREEN,"EP%d addr_tx == %02x, count_tx == %02x\r\n", i, addr_tx,cnt_tx );
|
// printf1(TAG_GREEN,"EP%d addr_tx == %02x, count_tx == %02x\r\n", i, addr_tx,cnt_tx );
|
||||||
printf1(TAG_GREEN,"EP%d addr_rx == %02x, count_rx == %02x\r\n", i, addr_rx,cnt_rx );
|
// printf1(TAG_GREEN,"EP%d addr_rx == %02x, count_rx == %02x\r\n", i, addr_rx,cnt_rx );
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
uint16_t ep1_tx = pma_ptr[1 * 4 + 0];
|
// uint16_t ep1_tx = pma_ptr[1 * 4 + 0];
|
||||||
|
//
|
||||||
for (int i = 0; i < 32; i++)
|
// for (int i = 0; i < 32; i++)
|
||||||
{
|
// {
|
||||||
val = pma_ptr[ep1_tx + i];
|
// val = pma_ptr[ep1_tx + i];
|
||||||
printf1(TAG_GREEN,"%04x ",val);
|
// printf1(TAG_GREEN,"%04x ",val);
|
||||||
}
|
// }
|
||||||
printf1(TAG_GREEN,"\r\n");
|
// printf1(TAG_GREEN,"\r\n");
|
||||||
}
|
// }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief USBD_HID_Init
|
* @brief USBD_HID_Init
|
||||||
|
Loading…
x
Reference in New Issue
Block a user