2010-10-14 08:08:09 +00:00
|
|
|
#include "config.h"
|
2010-08-10 06:34:36 +00:00
|
|
|
#include "ch.h"
|
|
|
|
#include "hal.h"
|
|
|
|
|
2010-10-20 01:00:37 +00:00
|
|
|
#include "../common/hwinit.c"
|
|
|
|
|
|
|
|
void
|
|
|
|
hwinit0 (void)
|
|
|
|
{
|
|
|
|
hwinit0_common ();
|
2010-08-10 06:34:36 +00:00
|
|
|
}
|
|
|
|
|
2010-10-20 01:00:37 +00:00
|
|
|
void
|
|
|
|
hwinit1 (void)
|
|
|
|
{
|
|
|
|
hwinit1_common ();
|
2010-08-10 06:34:36 +00:00
|
|
|
}
|
2010-10-19 04:56:43 +00:00
|
|
|
|
|
|
|
void
|
|
|
|
USB_Cable_Config (FunctionalState NewState)
|
|
|
|
{
|
|
|
|
if (NewState != DISABLE)
|
|
|
|
palClearPad (IOPORT3, GPIOC_DISC);
|
|
|
|
else
|
|
|
|
palSetPad (IOPORT3, GPIOC_DISC);
|
|
|
|
}
|
|
|
|
|
|
|
|
void
|
|
|
|
set_led (int value)
|
|
|
|
{
|
|
|
|
if (value)
|
|
|
|
palClearPad (IOPORT3, GPIOC_LED);
|
|
|
|
else
|
|
|
|
palSetPad (IOPORT3, GPIOC_LED);
|
|
|
|
}
|