⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 util.c

📁 Show Interworking of ARM/Thumb code on LPC23xx
💻 C
字号:
/*****************************************************************************
 *
 *      Project:    Clock Example
 *      Name:       Example
 *      Filename:   Util.c
 *      Date:       06.04.2001
 *      Rights:     hitex-systementwicklung GmbH
 *                  Greschbachstr. 12
 *                  76229  Karlsruhe
 *
 ****************************************************************************/

/******************************** module util.c *****************************/

#include "defines.h"

#define global extern   /* to declare external variables and functions      */
// #include "stdlib.h"

#undef global
#define global          /* to declare global variables and functions        */
#include "util.h"



void delay (int16_t value)
{
   while (value-- != 0u)
   {
   }
}

void increment (uint16_t *value)
{
    (*value)++;
}


void mem_copy (uint8_t *dest, uint8_t *source, int16_t len)
{
   while (len-- != 0u)
   {
      *(dest++) = *(source++);
   }
}

    /* linked lists */

void lnk_lst (void)
{
/*   element *list = NULL;
   element *n_list;
   int16_t index = 0u;
   int16_t valid_cnt = 0u;

   for (index = 0u; index < 10u; index++)
   {
      n_list = (element *) malloc (sizeof (element));
      if (n_list == NULL)
      {
         break;
      }
      sprintf (n_list->name, "Element: %d", index + 1u);
      n_list->count = index + 1u;
      n_list->ptr = n_list;
      n_list->next = list;
      list = n_list;
      valid_cnt++;
   }

   n_list = list;

   while (n_list != NULL)
   {
      valid_cnt--;
      list = n_list->next;
      free (n_list);
      n_list = list;
   }
*/
}

/************************************ EOF ***********************************/

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -