Skip to content

Commit

Permalink
transfer to F105, firmwares
Browse files Browse the repository at this point in the history
  • Loading branch information
j1rie committed Jul 18, 2018
1 parent a8622ed commit 3d34394
Show file tree
Hide file tree
Showing 77 changed files with 6 additions and 10 deletions.
1 change: 0 additions & 1 deletion STM32F105/src/config.h
Expand Up @@ -18,7 +18,6 @@
#define MACRO_DEPTH 8
#define WAKE_SLOTS 8
#define SIZEOF_IR 6
#define MIN_REPEATS 2 // TODO make configurable & use Eeprom

/* uncomment below for CooCox */
//#define FW_STR "2015-10-26_00-00_F105_jrie IRMP-Version: 3.07"
Expand Down
15 changes: 6 additions & 9 deletions STM32F105/src/main.c
Expand Up @@ -279,14 +279,12 @@ void eeprom_store(uint8_t virt_addr, uint8_t *buf)
uint8_t eeprom_restore(uint8_t *buf, uint8_t virt_addr)
{
uint8_t i, retVal = 0;
uint16_t EE_Data;
for(i=0; i<3; i++) {
if (EE_ReadVariable(virt_addr + i, &EE_Data)) {
if (EE_ReadVariable(virt_addr + i, (uint16_t *) &buf[2*i])) {
/* the variable was not found or no valid page was found */
EE_Data = 0xFFFF;
*((uint16_t *) &buf[2*i]) = 0xFFFF;
retVal = 1;
}
memcpy(&buf[2*i], &EE_Data, 2);
}
return retVal;
}
Expand Down Expand Up @@ -601,15 +599,15 @@ void check_macros(IRMP_DATA *ir)

void USB_DISC_release(void)
{
#if defined(Bootloader) && defined(PullDown) || defined(MapleMini) || defined(MapleMini_2k)
#if defined(Bootloader) && defined(PullDown) || defined(Maple)
/* bootloader must activate disconnect, here we release the disconnect */
GPIO_InitTypeDef GPIO_InitStructure;
RCC_APB2PeriphClockCmd(USB_DISC_RCC_APB2Periph, ENABLE);
GPIO_InitStructure.GPIO_Pin = USB_DISC_PIN;
GPIO_InitStructure.GPIO_Mode = GPIO_Mode_Out_OD;
GPIO_InitStructure.GPIO_Speed = GPIO_Speed_2MHz;
GPIO_Init(USB_DISC_PORT, &GPIO_InitStructure);
#if defined(MapleMini) || defined(MapleMini_2k)
#if defined(Maple)
GPIO_WriteBit(USB_DISC_PORT, USB_DISC_PIN, Bit_RESET);
#else
GPIO_WriteBit(USB_DISC_PORT, USB_DISC_PIN, Bit_SET);
Expand All @@ -619,7 +617,7 @@ void USB_DISC_release(void)

void USB_Reset(void)
{
#if defined(Bootloader) && !defined(PullDown) && !defined(MapleMini) && !defined(MapleMini_2k)
#if defined(Bootloader) && !defined(PullDown) && !defined(Maple)
/* reset USB */
RCC_AHBPeriphResetCmd(RCC_AHBPeriph_OTG_FS, ENABLE);
RCC_AHBPeriphResetCmd(RCC_AHBPeriph_OTG_FS, DISABLE);
Expand Down Expand Up @@ -721,8 +719,7 @@ int main(void)
}

/* send IR-data */
memcpy(buf, &myIRData, sizeof(myIRData));
USB_HID_SendData(REPORT_ID_IR, buf, sizeof(myIRData));
USB_HID_SendData(REPORT_ID_IR, (uint8_t *) &myIRData, sizeof(myIRData));
}
}
}
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

0 comments on commit 3d34394

Please sign in to comment.