红联Linux门户
Linux帮助

undefined reference to ...该如何解决

发布时间:2007-10-25 13:41:15来源:红联作者:risun007
/*
* Copyright 2004-2007 Freescale Semiconductor, Inc. All Rights Reserved.
*/

/*
* The code contained herein is licensed under the GNU General Public
* License. You may obtain a copy of the GNU General Public License
* Version 2 or later at the following locations:
*
* http://www.opensource.org/licenses/gpl-license.html
* http://www.gnu.org/copyleft/gpl.html
*/

#include
#include
#include
#include
#include
#include
#include
#include
#include

#include "gpio_mux.h"
#include "crm_regs.h"

#include


void gpio_fs453_reset_high(void)
{
gpio_free_mux(MX27_PIN_CLS);
if (gpio_request_mux(MX27_PIN_CLS, GPIO_MUX_GPIO)) {
printk(KERN_ERR "bug: request GPIO PA25 failed.\n");
return;
}

/* PA25 (CLS) as output */
mxc_set_gpio_direction(MX27_PIN_CLS, 0);
gpio_config_mux(MX27_PIN_CLS, GPIO_MUX_GPIO);
mxc_set_gpio_dataout(MX27_PIN_CLS, 1);
}

int main(void)
{

gpio_fs453_reset_high();
return 0;

}

我想把1个管脚置成高电平,这个程序在编译时候提示:
undefined reference to 'gpio_free_mux'。意思好像是找不到这个函数的原型。可是我把包含这个原型的.o 文件连接的时候又是一堆错误。包含这个函数原型的源文件拿来一起编译也是很多错误。置一个管脚高电平难道怎么难吗?
文章评论

共有 0 条评论