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

📄 maxstream_test.c

📁 MANTIS是由科罗拉多大学开发的传感器网络嵌入式操作系统。 这是mantis的0.9.5版本的源码。
💻 C
字号:
//  This file is part of MANTIS OS, Operating System//  See http://mantis.cs.colorado.edu/////  Copyright (C) 2003,2004,2005 University of Colorado, Boulder////  This program is free software; you can redistribute it and/or//  modify it under the terms of the mos license (see file LICENSE)/**************************************************************************//* File:    blink.c                                                       *//* Author      Jeff Rose   :  rosejn@colorado.edu                         *//*   Date: 12/11/03                                                       *//* Edited by   Adam Torgerson: adam.torgerson@colorado.edu                *//*   Date: 12/11/03                                                       *//* Edited by   Charles Gruenwald  :  gruenwal@colorado.edu                *//*   Date: 04/14/0/04                                                     *//*                                                                        *//* This is a simple demo app that flashes leds.                           *//**************************************************************************/#include <inttypes.h>#include "msched.h"  // MANTIS scheduler (gives us start)#include "command_daemon.h"#include "led.h"     // LED control#include "dev.h"#include "clock.h"#include "printf.h"#include "uart.h"static char* send_string = "Hello!\n";comBuf send_Buf;void send_uart1 (void){   uint8_t len = sizeof("Hello!\n");   uint8_t i;   send_Buf.size = len;   for(i = 0; i < len; i++){      send_Buf.data[i] = send_string [i];   }   printf("sending HELLO over uart test.\n");   while (1) {            mos_led_toggle (0);      printf("sending out...");      com_send(IFACE_SERIAL2, &send_Buf);      printf("sent.\n");      mos_thread_sleep (500);   }}   /* The start function is automatically called by the operating system,   for single-threaded applications, treat start() like main(). for multi-   threaded applications, start each thread in the start() function.*/void start(void){   mos_thread_new(mos_command_daemon, MOS_COMMANDER_STACK_SIZE,		  PRIORITY_NORMAL);   printf("Maxstream radio test!\n");//   uart1_set_baud(B9600);   uart_set_baud(UART1, 23);   mos_thread_new (send_uart1, 128, PRIORITY_NORMAL);   mos_led_display(0xFF);}

⌨️ 快捷键说明

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