资源简介

ds2781 stmelstudio整个工程

资源截图

代码片段和文件信息

/************************** demo *************************************
**author:wangqi
**使用了两个ASF模块:driver:usart,service:delay
**测试串口demo。
**********************************************************************/
#include 
#include 
#include “usart_megarf.h“
#include “ASF/common/services/delay/delay.h“
#include “APL/powermonitor.h“
#include “delay.h“

static int usart_putchar_printf(char var FILE *stream);

static FILE mystdout = FDEV_SETUP_STREAM(usart_putchar_printf NULL _FDEV_SETUP_WRITE);

int main (void)
{
    float voltempecurentacr;
    board_init();
    stdout = &mystdout;

    //vimpower
    DDRB|=(1<<6);
    PORTB|=(1<<6);

    initPowerMonitor();
    printf(“init board ok!!“);
    delay_s(2);


    configThePowerMinitor();
    while (1)
    {
        getPowerInfo(&vol&tempe&curent&acr);
        printf(“vol %ftemp %fcurent %facr %f“voltempecurentacr);
        delay_ms(700);
    }
    // Insert application code here after the board has been initialized.
}

int usart_putchar_printf(char var FILE *stream)
{
    // translate \n to \r for br@y++ terminal
    if (var == ‘\n‘)
        usart_putchar(USART_SERIAL_EXAMPLE ‘\r‘);
    usart_putchar(USART_SERIAL_EXAMPLEvar);
    return 0;
}

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     目录           0  2015-08-25 08:42  testOneWire\
     目录           0  2015-08-25 08:42  testOneWire\HCF2000test\
     目录           0  2015-08-27 17:00  testOneWire\HCF2000test\Debug\
     文件          13  2015-08-24 09:31  testOneWire\HCF2000test\Debug\HCF2000test.eep
     文件      159098  2015-08-24 09:31  testOneWire\HCF2000test\Debug\HCF2000test.elf
     文件       15694  2015-08-24 09:31  testOneWire\HCF2000test\Debug\HCF2000test.hex
     文件      130336  2015-08-24 09:31  testOneWire\HCF2000test\Debug\HCF2000test.lss
     文件       70489  2015-08-24 09:31  testOneWire\HCF2000test\Debug\HCF2000test.map
     文件       15388  2015-08-24 09:31  testOneWire\HCF2000test\Debug\HCF2000test.srec
     文件          13  2015-08-27 17:00  testOneWire\HCF2000test\Debug\HCF400test.eep
     文件      156352  2015-08-27 17:00  testOneWire\HCF2000test\Debug\HCF400test.elf
     文件       17343  2015-08-27 17:00  testOneWire\HCF2000test\Debug\HCF400test.hex
     文件      139308  2015-08-27 17:00  testOneWire\HCF2000test\Debug\HCF400test.lss
     文件       78554  2015-08-27 17:00  testOneWire\HCF2000test\Debug\HCF400test.map
     文件       16998  2015-08-27 17:00  testOneWire\HCF2000test\Debug\HCF400test.srec
     文件         448  2015-08-27 16:42  testOneWire\HCF2000test\Debug\makedep.mk
     文件       12443  2015-08-27 17:00  testOneWire\HCF2000test\Debug\Makefile
     目录           0  2015-08-27 17:00  testOneWire\HCF2000test\Debug\src\
     目录           0  2015-08-27 17:00  testOneWire\HCF2000test\Debug\src\APL\
     文件        2352  2015-08-27 17:00  testOneWire\HCF2000test\Debug\src\APL\powermonitor.d
     文件      105740  2015-08-27 17:00  testOneWire\HCF2000test\Debug\src\APL\powermonitor.o
     目录           0  2015-08-25 08:42  testOneWire\HCF2000test\Debug\src\ASF\
     目录           0  2015-08-25 08:42  testOneWire\HCF2000test\Debug\src\ASF\common\
     目录           0  2015-08-25 08:42  testOneWire\HCF2000test\Debug\src\ASF\common\boards\
     目录           0  2015-08-27 12:02  testOneWire\HCF2000test\Debug\src\ASF\common\boards\user_board\
     文件        4697  2015-08-27 12:02  testOneWire\HCF2000test\Debug\src\ASF\common\boards\user_board\init.d
     文件      159460  2015-08-27 12:02  testOneWire\HCF2000test\Debug\src\ASF\common\boards\user_board\init.o
     目录           0  2015-08-25 08:42  testOneWire\HCF2000test\Debug\src\ASF\common\services\
     目录           0  2015-08-25 08:42  testOneWire\HCF2000test\Debug\src\ASF\common\services\clock\
     目录           0  2015-08-27 12:02  testOneWire\HCF2000test\Debug\src\ASF\common\services\clock\mega\
     文件        4105  2015-08-27 12:02  testOneWire\HCF2000test\Debug\src\ASF\common\services\clock\mega\sysclk.d
............此处省略100个文件信息

评论

共有 条评论