remove solo functions from device.h

This commit is contained in:
Conor Patrick 2019-11-19 16:02:46 -05:00
parent ebae036a93
commit 94b1ce00cd
5 changed files with 27 additions and 24 deletions

View File

@ -9,12 +9,9 @@
#include "storage.h" #include "storage.h"
void device_init(int argc, char *argv[]);
uint32_t millis(); uint32_t millis();
void delay(uint32_t ms);
// HID message size in bytes // HID message size in bytes
#define HID_MESSAGE_SIZE 64 #define HID_MESSAGE_SIZE 64
@ -26,9 +23,6 @@ void usbhid_send(uint8_t * msg);
void usbhid_close(); void usbhid_close();
void main_loop_delay();
void heartbeat();
void device_reboot(); void device_reboot();
@ -42,8 +36,7 @@ int authenticator_is_backup_initialized();
void authenticator_write_state(AuthenticatorState *, int backup); void authenticator_write_state(AuthenticatorState *, int backup);
// Called each main loop. Doesn't need to do anything.
void device_manage();
// sets status that's uses for sending status updates ~100ms. // sets status that's uses for sending status updates ~100ms.
// A timer should be set up to call `ctaphid_update_status` // A timer should be set up to call `ctaphid_update_status`
@ -64,14 +57,6 @@ int ctap_generate_rng(uint8_t * dst, size_t num);
// @param amount the amount to increase the counter by. // @param amount the amount to increase the counter by.
uint32_t ctap_atomic_count(uint32_t amount); uint32_t ctap_atomic_count(uint32_t amount);
// Verify the user
// return 1 if user is verified, 0 if not
int ctap_user_verification(uint8_t arg);
// Must be implemented by application
// data is HID_MESSAGE_SIZE long in bytes
void ctaphid_write_block(uint8_t * data);
// Resident key // Resident key
void ctap_reset_rk(); void ctap_reset_rk();
@ -80,9 +65,7 @@ void ctap_store_rk(int index,CTAP_residentKey * rk);
void ctap_load_rk(int index,CTAP_residentKey * rk); void ctap_load_rk(int index,CTAP_residentKey * rk);
void ctap_overwrite_rk(int index,CTAP_residentKey * rk); void ctap_overwrite_rk(int index,CTAP_residentKey * rk);
// For Solo hacker
void boot_solo_bootloader();
void boot_st_bootloader();
// HID wink command // HID wink command
void device_wink(); void device_wink();
@ -108,7 +91,6 @@ int device_is_nfc();
void device_disable_up(bool request_active); void device_disable_up(bool request_active);
void device_init_button();
/** Return pointer to attestation key. /** Return pointer to attestation key.
*/ */

View File

@ -20,8 +20,8 @@
#include "ctap.h" #include "ctap.h"
#include "app.h" #include "app.h"
#if !defined(TEST)
void device_init(int argc, char *argv[]);
int main(int argc, char *argv[]) int main(int argc, char *argv[])
{ {
@ -82,5 +82,3 @@ int main(int argc, char *argv[])
printf1(TAG_GREEN, "done\n"); printf1(TAG_GREEN, "done\n");
return 0; return 0;
} }
#endif

View File

@ -8,6 +8,7 @@
#define _APP_H_ #define _APP_H_
#include <stdint.h> #include <stdint.h>
#include "version.h" #include "version.h"
#include "solo.h"
#define SOLO #define SOLO

View File

@ -285,7 +285,7 @@ static void device_migrate(){
} }
} }
void device_init(int argc, char *argv[]) void device_init()
{ {
hw_init(LOW_FREQUENCY); hw_init(LOW_FREQUENCY);

View File

@ -0,0 +1,22 @@
#ifndef _SOLO_H_
#define _SOLO_H_
void device_init();
void main_loop_delay();
void heartbeat();
// Called each main loop. Doesn't need to do anything.
void device_manage();
void device_init_button();
// For Solo hacker
void boot_solo_bootloader();
void boot_st_bootloader();
void delay(uint32_t ms);
#endif