58、编写lcd调色板和实现裸机除法程序

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/qq_18077275/article/details/89417601

1、添加除法
对于未实现的函数:
a. 去uboot中查找
b. 去内核源码中查找
c. 去库函数中查找  (一般来说编译器自带有很多库)
   进入工具链的目录: grep "__floatsisf" * -nR 找到.a文件

2、s3c2440_lcd_controller.c添加

/* 设置调色板之前, 先关闭lcd_controller */
void s3c2440_lcd_controller_init_palette(void)
{
    volatile unsigned int *palette_base =  (volatile unsigned int *)0x4D000400;
    int i;

    int bit = LCDCON1 & (1<<0);

    /* LCDCON1'BIT 0 : 设置LCD控制器是否输出信号 */
    if (bit)
        LCDCON1 &= ~(1<<0);

    for (i = 0; i < 256; i++)
    {
        /* 低16位 : rgb565 */    
        *palette_base++ = i;
    }

    if (bit)
        LCDCON1 |= (1<<0);
}

2、

猜你喜欢

转载自blog.csdn.net/qq_18077275/article/details/89417601