Skip to content

Commit

Permalink
New VID/PID from pidcodes.github.com
Browse files Browse the repository at this point in the history
  • Loading branch information
ClusterM committed Dec 1, 2020
1 parent 1075cbb commit dd03899
Show file tree
Hide file tree
Showing 4 changed files with 71 additions and 69 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,6 @@ Release/
incremental_db/
db/
output_files/
*.qws
*.launch
~*~
131 changes: 66 additions & 65 deletions STM32/Core/Src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -86,9 +86,9 @@ int _write(int file, char *ptr, int len)
/* USER CODE END 0 */

/**
* @brief The application entry point.
* @retval int
*/
* @brief The application entry point.
* @retval int
*/
int main(void)
{
/* USER CODE BEGIN 1 */
Expand Down Expand Up @@ -246,18 +246,18 @@ int main(void)
}

/**
* @brief System Clock Configuration
* @retval None
*/
* @brief System Clock Configuration
* @retval None
*/
void SystemClock_Config(void)
{
RCC_OscInitTypeDef RCC_OscInitStruct = { 0 };
RCC_ClkInitTypeDef RCC_ClkInitStruct = { 0 };
RCC_PeriphCLKInitTypeDef PeriphClkInit = { 0 };
RCC_OscInitTypeDef RCC_OscInitStruct = {0};
RCC_ClkInitTypeDef RCC_ClkInitStruct = {0};
RCC_PeriphCLKInitTypeDef PeriphClkInit = {0};

/** Initializes the RCC Oscillators according to the specified parameters
* in the RCC_OscInitTypeDef structure.
*/
* in the RCC_OscInitTypeDef structure.
*/
RCC_OscInitStruct.OscillatorType = RCC_OSCILLATORTYPE_HSE;
RCC_OscInitStruct.HSEState = RCC_HSE_ON;
RCC_OscInitStruct.HSEPredivValue = RCC_HSE_PREDIV_DIV2;
Expand All @@ -270,8 +270,9 @@ void SystemClock_Config(void)
Error_Handler();
}
/** Initializes the CPU, AHB and APB buses clocks
*/
RCC_ClkInitStruct.ClockType = RCC_CLOCKTYPE_HCLK | RCC_CLOCKTYPE_SYSCLK | RCC_CLOCKTYPE_PCLK1 | RCC_CLOCKTYPE_PCLK2;
*/
RCC_ClkInitStruct.ClockType = RCC_CLOCKTYPE_HCLK|RCC_CLOCKTYPE_SYSCLK
|RCC_CLOCKTYPE_PCLK1|RCC_CLOCKTYPE_PCLK2;
RCC_ClkInitStruct.SYSCLKSource = RCC_SYSCLKSOURCE_PLLCLK;
RCC_ClkInitStruct.AHBCLKDivider = RCC_SYSCLK_DIV1;
RCC_ClkInitStruct.APB1CLKDivider = RCC_HCLK_DIV2;
Expand All @@ -291,19 +292,19 @@ void SystemClock_Config(void)
}

/**
* @brief TIM1 Initialization Function
* @param None
* @retval None
*/
* @brief TIM1 Initialization Function
* @param None
* @retval None
*/
static void MX_TIM1_Init(void)
{

/* USER CODE BEGIN TIM1_Init 0 */

/* USER CODE END TIM1_Init 0 */

TIM_ClockConfigTypeDef sClockSourceConfig = { 0 };
TIM_MasterConfigTypeDef sMasterConfig = { 0 };
TIM_ClockConfigTypeDef sClockSourceConfig = {0};
TIM_MasterConfigTypeDef sMasterConfig = {0};

/* USER CODE BEGIN TIM1_Init 1 */

Expand Down Expand Up @@ -337,20 +338,20 @@ static void MX_TIM1_Init(void)
}

/**
* @brief TIM2 Initialization Function
* @param None
* @retval None
*/
* @brief TIM2 Initialization Function
* @param None
* @retval None
*/
static void MX_TIM2_Init(void)
{

/* USER CODE BEGIN TIM2_Init 0 */

/* USER CODE END TIM2_Init 0 */

TIM_ClockConfigTypeDef sClockSourceConfig = { 0 };
TIM_MasterConfigTypeDef sMasterConfig = { 0 };
TIM_OC_InitTypeDef sConfigOC = { 0 };
TIM_ClockConfigTypeDef sClockSourceConfig = {0};
TIM_MasterConfigTypeDef sMasterConfig = {0};
TIM_OC_InitTypeDef sConfigOC = {0};

/* USER CODE BEGIN TIM2_Init 1 */

Expand Down Expand Up @@ -396,19 +397,19 @@ static void MX_TIM2_Init(void)
}

/**
* @brief TIM3 Initialization Function
* @param None
* @retval None
*/
* @brief TIM3 Initialization Function
* @param None
* @retval None
*/
static void MX_TIM3_Init(void)
{

/* USER CODE BEGIN TIM3_Init 0 */

/* USER CODE END TIM3_Init 0 */

TIM_SlaveConfigTypeDef sSlaveConfig = { 0 };
TIM_MasterConfigTypeDef sMasterConfig = { 0 };
TIM_SlaveConfigTypeDef sSlaveConfig = {0};
TIM_MasterConfigTypeDef sMasterConfig = {0};

/* USER CODE BEGIN TIM3_Init 1 */

Expand Down Expand Up @@ -442,19 +443,19 @@ static void MX_TIM3_Init(void)
}

/**
* @brief TIM4 Initialization Function
* @param None
* @retval None
*/
* @brief TIM4 Initialization Function
* @param None
* @retval None
*/
static void MX_TIM4_Init(void)
{

/* USER CODE BEGIN TIM4_Init 0 */

/* USER CODE END TIM4_Init 0 */

TIM_SlaveConfigTypeDef sSlaveConfig = { 0 };
TIM_MasterConfigTypeDef sMasterConfig = { 0 };
TIM_SlaveConfigTypeDef sSlaveConfig = {0};
TIM_MasterConfigTypeDef sMasterConfig = {0};

/* USER CODE BEGIN TIM4_Init 1 */

Expand Down Expand Up @@ -488,20 +489,20 @@ static void MX_TIM4_Init(void)
}

/**
* @brief TIM5 Initialization Function
* @param None
* @retval None
*/
* @brief TIM5 Initialization Function
* @param None
* @retval None
*/
static void MX_TIM5_Init(void)
{

/* USER CODE BEGIN TIM5_Init 0 */

/* USER CODE END TIM5_Init 0 */

TIM_ClockConfigTypeDef sClockSourceConfig = { 0 };
TIM_MasterConfigTypeDef sMasterConfig = { 0 };
TIM_OC_InitTypeDef sConfigOC = { 0 };
TIM_ClockConfigTypeDef sClockSourceConfig = {0};
TIM_MasterConfigTypeDef sMasterConfig = {0};
TIM_OC_InitTypeDef sConfigOC = {0};

/* USER CODE BEGIN TIM5_Init 1 */

Expand Down Expand Up @@ -547,10 +548,10 @@ static void MX_TIM5_Init(void)
}

/**
* Enable DMA controller clock
* Configure DMA for memory to memory transfers
* hdma_memtomem_dma1_channel1
*/
* Enable DMA controller clock
* Configure DMA for memory to memory transfers
* hdma_memtomem_dma1_channel1
*/
static void MX_DMA_Init(void)
{

Expand All @@ -569,7 +570,7 @@ static void MX_DMA_Init(void)
hdma_memtomem_dma1_channel1.Init.Priority = DMA_PRIORITY_VERY_HIGH;
if (HAL_DMA_Init(&hdma_memtomem_dma1_channel1) != HAL_OK)
{
Error_Handler();
Error_Handler( );
}

/* DMA interrupt init */
Expand All @@ -583,13 +584,13 @@ static void MX_DMA_Init(void)
}

/**
* @brief GPIO Initialization Function
* @param None
* @retval None
*/
* @brief GPIO Initialization Function
* @param None
* @retval None
*/
static void MX_GPIO_Init(void)
{
GPIO_InitTypeDef GPIO_InitStruct = { 0 };
GPIO_InitTypeDef GPIO_InitStruct = {0};

/* GPIO Ports Clock Enable */
__HAL_RCC_GPIOF_CLK_ENABLE();
Expand Down Expand Up @@ -619,7 +620,7 @@ static void MX_GPIO_Init(void)
HAL_GPIO_Init(GPIOA, &GPIO_InitStruct);

/*Configure GPIO pins : CIRAM_CE_Pin CIRAM_A10_Pin */
GPIO_InitStruct.Pin = CIRAM_CE_Pin | CIRAM_A10_Pin;
GPIO_InitStruct.Pin = CIRAM_CE_Pin|CIRAM_A10_Pin;
GPIO_InitStruct.Mode = GPIO_MODE_INPUT;
GPIO_InitStruct.Pull = GPIO_NOPULL;
HAL_GPIO_Init(GPIOB, &GPIO_InitStruct);
Expand Down Expand Up @@ -647,14 +648,14 @@ static void MX_FSMC_Init(void)

/* USER CODE END FSMC_Init 0 */

FSMC_NORSRAM_TimingTypeDef Timing = { 0 };
FSMC_NORSRAM_TimingTypeDef Timing = {0};

/* USER CODE BEGIN FSMC_Init 1 */

/* USER CODE END FSMC_Init 1 */

/** Perform the SRAM1 memory initialization sequence
*/
*/
hsram1.Instance = FSMC_NORSRAM_DEVICE;
hsram1.Extended = FSMC_NORSRAM_EXTENDED_DEVICE;
/* hsram1.Init */
Expand Down Expand Up @@ -683,11 +684,11 @@ static void MX_FSMC_Init(void)

if (HAL_SRAM_Init(&hsram1, &Timing, NULL) != HAL_OK)
{
Error_Handler();
Error_Handler( );
}

/** Perform the SRAM2 memory initialization sequence
*/
*/
hsram2.Instance = FSMC_NORSRAM_DEVICE;
hsram2.Extended = FSMC_NORSRAM_EXTENDED_DEVICE;
/* hsram2.Init */
Expand Down Expand Up @@ -716,11 +717,11 @@ static void MX_FSMC_Init(void)

if (HAL_SRAM_Init(&hsram2, &Timing, NULL) != HAL_OK)
{
Error_Handler();
Error_Handler( );
}

/** Disconnect NADV
*/
*/

__HAL_AFIO_FSMCNADV_DISCONNECTED();

Expand All @@ -734,9 +735,9 @@ static void MX_FSMC_Init(void)
/* USER CODE END 4 */

/**
* @brief This function is executed in case of error occurrence.
* @retval None
*/
* @brief This function is executed in case of error occurrence.
* @retval None
*/
void Error_Handler(void)
{
/* USER CODE BEGIN Error_Handler_Debug */
Expand Down
4 changes: 2 additions & 2 deletions STM32/FamicomDumper.ioc
Original file line number Diff line number Diff line change
Expand Up @@ -356,9 +356,9 @@ TIM5.Pulse-PWM\ Generation3\ CH3=0
USB_DEVICE.CLASS_NAME_FS=CDC
USB_DEVICE.IPParameters=VirtualMode,VirtualModeFS,CLASS_NAME_FS,VID,MANUFACTURER_STRING,PID_CDC_FS,PRODUCT_STRING_CDC_FS
USB_DEVICE.MANUFACTURER_STRING=Cluster
USB_DEVICE.PID_CDC_FS=54543
USB_DEVICE.PID_CDC_FS=0xBABA
USB_DEVICE.PRODUCT_STRING_CDC_FS=Famicom Dumper/Writer
USB_DEVICE.VID=5511
USB_DEVICE.VID=0x1209
USB_DEVICE.VirtualMode=Cdc
USB_DEVICE.VirtualModeFS=Cdc_FS
VP_SYS_VS_Systick.Mode=SysTick
Expand Down
4 changes: 2 additions & 2 deletions STM32/USB_DEVICE/App/usbd_desc.c
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,10 @@
* @{
*/

#define USBD_VID 5511
#define USBD_VID 0x1209
#define USBD_LANGID_STRING 1033
#define USBD_MANUFACTURER_STRING "Cluster"
#define USBD_PID_FS 54543
#define USBD_PID_FS 0xBABA
#define USBD_PRODUCT_STRING_FS "Famicom Dumper/Writer"
#define USBD_CONFIGURATION_STRING_FS "CDC Config"
#define USBD_INTERFACE_STRING_FS "CDC Interface"
Expand Down

0 comments on commit dd03899

Please sign in to comment.