Skip to content

Commit

Permalink
단편화 추가
Browse files Browse the repository at this point in the history
  • Loading branch information
imsoo committed May 24, 2019
1 parent d6ceccf commit c0730d7
Show file tree
Hide file tree
Showing 24 changed files with 3,580 additions and 1 deletion.
33 changes: 33 additions & 0 deletions Inc/display.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
/*
display.h
*/
#define MSG_HEADER_LENGTH 16
#define MSG_NUM 0x05
#define LIFI_MSG 0x00
#define BT_MSG 0x01
#define CC2530_MSG 0x02
#define INTEG_MSG 0x03
#define SYSTEM_MSG 0x04


#define ROW_LINES 12
#define FIRST_ROW 0
#define LAST_ROW ROW_LINES - 1

#define COL_NUMS 79
#define FIRST_COL 0
#define LAST_COL COL_NUMS - 1

#define RECT_CHAR_START 22
#define RECT_CHAR_END 54
#define RECT_CHAR_LEN 10
#define RECT_FIRST_CON_START RECT_CHAR_START - 6
#define RECT_SECOND_CON_START (RECT_CHAR_START + RECT_CHAR_LEN + 4)

static char *str_message[MSG_NUM] = {" LI-FI ", "BLUETOOTH", " CC2530 ", "INTEG-MAC", " SYSTEM "};
void init_display_buffer();

void insert_display_message(int message_type, char *message);
void print_info(void *arg);
void print_message(void *arg);
void display();
8 changes: 8 additions & 0 deletions Inc/gpio.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
/*
gpio.h
*/

void GPIO_Init(void);
void HAL_GPIO_EXTI_Callback(uint16_t GPIO_Pin);
17 changes: 17 additions & 0 deletions Inc/hash.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
/*
hash.h
*/

struct node
{
int id;
INTEG_TABLE data;
struct node *hashNext;
};

struct node *get_hashNode();
void AddHashData(int key, struct node *node);
void DelHashData(int id);
struct node* FindHashData(int id);
void PrintAllHashData();
void PrintHashData(struct node *t_node);
20 changes: 20 additions & 0 deletions Inc/list.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
/*
list.h
*/

struct node {
int data;
struct node *link;
};

extern struct node *Head;

void insert_node_head(struct node *np);
void insert_node_tail(struct node *np);
void insert_node_ascn(struct node *np);
void free_node(struct node *np);
void tour_list();
void free_list();
struct node *get_node();
91 changes: 91 additions & 0 deletions Inc/main.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
/* USER CODE BEGIN Header */
/**
******************************************************************************
* @file : main.h
* @brief : Header for main.c file.
* This file contains the common defines of the application.
******************************************************************************
** This notice applies to any and all portions of this file
* that are not between comment pairs USER CODE BEGIN and
* USER CODE END. Other portions of this file, whether
* inserted by the user or by software development tools
* are owned by their respective copyright owners.
*
* COPYRIGHT(c) 2019 STMicroelectronics
*
* Redistribution and use in source and binary forms, with or without modification,
* are permitted provided that the following conditions are met:
* 1. Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
* 3. Neither the name of STMicroelectronics nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
******************************************************************************
*/
/* USER CODE END Header */

/* Define to prevent recursive inclusion -------------------------------------*/
#ifndef __MAIN_H
#define __MAIN_H

#ifdef __cplusplus
extern "C" {
#endif

/* Includes ------------------------------------------------------------------*/
#include "stm32f4xx_hal.h"

/* Private includes ----------------------------------------------------------*/
/* USER CODE BEGIN Includes */

/* USER CODE END Includes */

/* Exported types ------------------------------------------------------------*/
/* USER CODE BEGIN ET */

/* USER CODE END ET */

/* Exported constants --------------------------------------------------------*/
/* USER CODE BEGIN EC */

/* USER CODE END EC */

/* Exported macro ------------------------------------------------------------*/
/* USER CODE BEGIN EM */

/* USER CODE END EM */

/* Exported functions prototypes ---------------------------------------------*/
void Error_Handler(void);

/* USER CODE BEGIN EFP */

/* USER CODE END EFP */

/* Private defines -----------------------------------------------------------*/
/* USER CODE BEGIN Private defines */

/* USER CODE END Private defines */

#ifdef __cplusplus
}
#endif

#endif /* __MAIN_H */

/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
12 changes: 12 additions & 0 deletions Inc/queue.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
/*
queue.h
*/

void q_init(void);
unsigned int qi_insert(unsigned char ch);
unsigned int qi_delete(void);
unsigned int qi_remove(void);
unsigned int qo_insert(unsigned char ch);
unsigned int qo_delete(void);
Loading

0 comments on commit c0730d7

Please sign in to comment.