Пример #1
0
void blit_rect(uint16_t sx, uint16_t sy, uint16_t width, uint16_t height, uint32_t start_address)
{
    //The X dim is X2 because each column is two byts
    flashstate = fs_full_blit;
    row = sy;
    col = sx*2;
    row_start = sy;
    col_start = sx*2;
    row_stop = sy + height;
    col_stop = (sx + width)*2;
    flash_pix_left = (width);
    flash_pix_left *= (height);
    flash_pix_left *= 2;

    //Start flash read
    flash_deselect();
    flash_select();
    spi2_w_b_xdiscard(0x0B);
    spi2_w_b((start_address >> 16) & 0xFF );
    spi2_w_b((start_address >> 8 ) & 0xFF );
    spi2_w_b((start_address) & 0xFF );
    spi2_rw_b(0xd0); //First dummy byte

    //Start GFX write
    lcd_set_cursor(row, col/2);
    lcd_start_gfx();
}
Пример #2
0
void CS_Configuration(void)
{
    GPIO_InitTypeDef GPIO_InitStructure;
    RCC_AHB1PeriphClockCmd(RCC_AHB1Periph_GPIOD , ENABLE);
	
	GPIO_InitStructure.GPIO_Pin = GPIO_Pin_11;
	GPIO_InitStructure.GPIO_Mode = GPIO_Mode_OUT;
	GPIO_InitStructure.GPIO_OType= GPIO_OType_PP;
	GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz;
	GPIO_Init(GPIOD, &GPIO_InitStructure);
	
	flash_select(0);
}
Пример #3
0
app_action_t application_function_flash_select_once(string_t *src, string_t *dst)
{
	return(flash_select(src, dst, true));
}
Пример #4
0
app_action_t application_function_flash_select(string_t *src, string_t *dst)
{
	return(flash_select(src, dst, false));
}