Apply changes by Kaz Kojima
This commit is contained in:
@@ -53,4 +53,10 @@ void hwinit1(void) {
|
|||||||
* ChibiOS/RT initialization.
|
* ChibiOS/RT initialization.
|
||||||
*/
|
*/
|
||||||
chSysInit();
|
chSysInit();
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Clear LED and SHUTDOWN output.
|
||||||
|
*/
|
||||||
|
palClearPad (IOPORT5, GPIOE_LED);
|
||||||
|
palClearPad (IOPORT3, GPIOC_SHUTDOWN);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -36,9 +36,9 @@ void
|
|||||||
USB_Cable_Config (FunctionalState NewState)
|
USB_Cable_Config (FunctionalState NewState)
|
||||||
{
|
{
|
||||||
if (NewState != DISABLE)
|
if (NewState != DISABLE)
|
||||||
palClearPad (IOPORT4, GPIOC_DISC);
|
palClearPad (IOPORT4, GPIOD_DISC);
|
||||||
else
|
else
|
||||||
palSetPad (IOPORT4, GPIOC_DISC);
|
palSetPad (IOPORT4, GPIOD_DISC);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
@@ -50,7 +50,7 @@ void
|
|||||||
set_led (int value)
|
set_led (int value)
|
||||||
{
|
{
|
||||||
if (value)
|
if (value)
|
||||||
palClearPad (IOPORT5, GPIOC_LEDR);
|
palClearPad (IOPORT5, GPIOE_LEDR);
|
||||||
else
|
else
|
||||||
palSetPad (IOPORT5, GPIOC_LEDR);
|
palSetPad (IOPORT5, GPIOE_LEDR);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -115,8 +115,10 @@ rsa_decrypt (const uint8_t *input, uint8_t *output, int msg_len)
|
|||||||
int r;
|
int r;
|
||||||
int output_len;
|
int output_len;
|
||||||
|
|
||||||
|
#ifdef DEBUG
|
||||||
put_string ("RSA decrypt:");
|
put_string ("RSA decrypt:");
|
||||||
put_word ((uint32_t)&output_len);
|
put_word ((uint32_t)&output_len);
|
||||||
|
#endif
|
||||||
|
|
||||||
mpi_init (&P1, &Q1, &H, NULL);
|
mpi_init (&P1, &Q1, &H, NULL);
|
||||||
rsa_init (&rsa_ctx, RSA_PKCS_V15, 0);
|
rsa_init (&rsa_ctx, RSA_PKCS_V15, 0);
|
||||||
|
|||||||
Reference in New Issue
Block a user