Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove unused code from nanoBooter main 🚧 #730

Merged
merged 1 commit into from
Jun 6, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 3 additions & 5 deletions targets/CMSIS-OS/ChibiOS/MBN_QUAIL/nanoBooter/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
#include <usbcfg.h>
#include <targetHAL.h>
#include <WireProtocol_ReceiverThread.h>
#include <nanoPAL_BlockStorage.h>
#include <LaunchCLR.h>

void BlinkerThread(void const * argument)
Expand Down Expand Up @@ -39,9 +40,6 @@ osThreadDef(ReceiverThread, osPriorityHigh, 3072, "ReceiverThread");
// Application entry point.
int main(void) {

osThreadId blinkerThreadId;
osThreadId receiverThreadId;

// HAL initialization, this also initializes the configured device drivers
// and performs the board-specific initializations.
halInit();
Expand Down Expand Up @@ -70,10 +68,10 @@ int main(void) {
usbConnectBus(serusbcfg.usbp);

// Creates the blinker thread, it does not start immediately.
blinkerThreadId = osThreadCreate(osThread(BlinkerThread), NULL);
osThreadCreate(osThread(BlinkerThread), NULL);

// create the receiver thread
receiverThreadId = osThreadCreate(osThread(ReceiverThread), NULL);
osThreadCreate(osThread(ReceiverThread), NULL);

// start kernel, after this main() will behave like a thread with priority osPriorityNormal
osKernelStart();
Expand Down
8 changes: 3 additions & 5 deletions targets/CMSIS-OS/ChibiOS/NETDUINO3_WIFI/nanoBooter/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
#include <usbcfg.h>
#include <targetHAL.h>
#include <WireProtocol_ReceiverThread.h>
#include <nanoPAL_BlockStorage.h>
#include <LaunchCLR.h>

void BlinkerThread(void const * argument)
Expand Down Expand Up @@ -48,9 +49,6 @@ osThreadDef(ReceiverThread, osPriorityHigh, 3072, "ReceiverThread");
// Application entry point.
int main(void) {

osThreadId blinkerThreadId;
osThreadId receiverThreadId;

// HAL initialization, this also initializes the configured device drivers
// and performs the board-specific initializations.
halInit();
Expand Down Expand Up @@ -79,10 +77,10 @@ int main(void) {
usbConnectBus(serusbcfg.usbp);

// Creates the blinker thread, it does not start immediately.
blinkerThreadId = osThreadCreate(osThread(BlinkerThread), NULL);
osThreadCreate(osThread(BlinkerThread), NULL);

// create the receiver thread
receiverThreadId = osThreadCreate(osThread(ReceiverThread), NULL);
osThreadCreate(osThread(ReceiverThread), NULL);

// start kernel, after this main() will behave like a thread with priority osPriorityNormal
osKernelStart();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
#include <swo.h>
#include <targetHAL.h>
#include <WireProtocol_ReceiverThread.h>
#include <nanoPAL_BlockStorage.h>
#include <LaunchCLR.h>

void BlinkerThread(void const * argument)
Expand All @@ -35,9 +36,6 @@ osThreadDef(ReceiverThread, osPriorityHigh, 3072, "ReceiverThread");
// Application entry point.
int main(void) {

osThreadId blinkerThreadId;
osThreadId receiverThreadId;

// HAL initialization, this also initializes the configured device drivers
// and performs the board-specific initializations.
halInit();
Expand Down Expand Up @@ -81,10 +79,10 @@ int main(void) {
usbConnectBus(serusbcfg.usbp);

// Creates the blinker thread, it does not start immediately.
blinkerThreadId = osThreadCreate(osThread(BlinkerThread), NULL);
osThreadCreate(osThread(BlinkerThread), NULL);

// create the receiver thread
receiverThreadId = osThreadCreate(osThread(ReceiverThread), NULL);
osThreadCreate(osThread(ReceiverThread), NULL);

// start kernel, after this main() will behave like a thread with priority osPriorityNormal
osKernelStart();
Expand Down
8 changes: 3 additions & 5 deletions targets/CMSIS-OS/ChibiOS/ST_NUCLEO64_F091RC/nanoBooter/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
#include <swo.h>
#include <targetHAL.h>
#include <WireProtocol_ReceiverThread.h>
#include <nanoPAL_BlockStorage.h>
#include <LaunchCLR.h>

void BlinkerThread(void const * argument)
Expand All @@ -33,9 +34,6 @@ osThreadDef(ReceiverThread, osPriorityHigh, 3072, "ReceiverThread");
// Application entry point.
int main(void) {

osThreadId blinkerThreadId;
osThreadId receiverThreadId;

// HAL initialization, this also initializes the configured device drivers
// and performs the board-specific initializations.
halInit();
Expand Down Expand Up @@ -71,10 +69,10 @@ int main(void) {
palSetPadMode(GPIOA, 3, PAL_MODE_ALTERNATE(1)); // USART2 RX

// Creates the blinker thread, it does not start immediately.
blinkerThreadId = osThreadCreate(osThread(BlinkerThread), NULL);
osThreadCreate(osThread(BlinkerThread), NULL);

// create the receiver thread
receiverThreadId = osThreadCreate(osThread(ReceiverThread), NULL);
osThreadCreate(osThread(ReceiverThread), NULL);

// start kernel, after this main() will behave like a thread with priority osPriorityNormal
osKernelStart();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
#include <swo.h>
#include <targetHAL.h>
#include <WireProtocol_ReceiverThread.h>
#include <nanoPAL_BlockStorage.h>
#include <LaunchCLR.h>

void BlinkerThread(void const * argument)
Expand All @@ -35,9 +36,6 @@ osThreadDef(ReceiverThread, osPriorityHigh, 3072, "ReceiverThread");
// Application entry point.
int main(void) {

osThreadId blinkerThreadId;
osThreadId receiverThreadId;

// HAL initialization, this also initializes the configured device drivers
// and performs the board-specific initializations.
halInit();
Expand Down Expand Up @@ -80,10 +78,10 @@ int main(void) {
usbConnectBus(serusbcfg.usbp);

// Creates the blinker thread, it does not start immediately.
blinkerThreadId = osThreadCreate(osThread(BlinkerThread), NULL);
osThreadCreate(osThread(BlinkerThread), NULL);

// create the receiver thread
receiverThreadId = osThreadCreate(osThread(ReceiverThread), NULL);
osThreadCreate(osThread(ReceiverThread), NULL);

// start kernel, after this main() will behave like a thread with priority osPriorityNormal
osKernelStart();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
#include <swo.h>
#include <targetHAL.h>
#include <WireProtocol_ReceiverThread.h>
#include <nanoPAL_BlockStorage.h>
#include <LaunchCLR.h>

void BlinkerThread(void const * argument)
Expand All @@ -36,9 +37,6 @@ osThreadDef(ReceiverThread, osPriorityHigh, 3072, "ReceiverThread");
// Application entry point.
int main(void) {

osThreadId blinkerThreadId;
osThreadId receiverThreadId;

// HAL initialization, this also initializes the configured device drivers
// and performs the board-specific initializations.
halInit();
Expand Down Expand Up @@ -81,10 +79,10 @@ int main(void) {
usbConnectBus(serusbcfg.usbp);

// Creates the blinker thread, it does not start immediately.
blinkerThreadId = osThreadCreate(osThread(BlinkerThread), NULL);
osThreadCreate(osThread(BlinkerThread), NULL);

// create the receiver thread
receiverThreadId = osThreadCreate(osThread(ReceiverThread), NULL);
osThreadCreate(osThread(ReceiverThread), NULL);

// start kernel, after this main() will behave like a thread with priority osPriorityNormal
osKernelStart();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
#include <swo.h>
#include <targetHAL.h>
#include <WireProtocol_ReceiverThread.h>
#include <nanoPAL_BlockStorage.h>
#include <LaunchCLR.h>

void BlinkerThread(void const * argument)
Expand All @@ -35,9 +36,6 @@ osThreadDef(ReceiverThread, osPriorityHigh, 3072, "ReceiverThread");
// Application entry point.
int main(void) {

osThreadId blinkerThreadId;
osThreadId receiverThreadId;

// HAL initialization, this also initializes the configured device drivers
// and performs the board-specific initializations.
halInit();
Expand Down Expand Up @@ -81,10 +79,10 @@ int main(void) {
usbConnectBus(serusbcfg.usbp);

// Creates the blinker thread, it does not start immediately.
blinkerThreadId = osThreadCreate(osThread(BlinkerThread), NULL);
osThreadCreate(osThread(BlinkerThread), NULL);

// create the receiver thread
receiverThreadId = osThreadCreate(osThread(ReceiverThread), NULL);
osThreadCreate(osThread(ReceiverThread), NULL);

// start kernel, after this main() will behave like a thread with priority osPriorityNormal
osKernelStart();
Expand Down