void port1_init()
{
	__high(P1DIR, IC_74XX595_DATA | IC_74XX595_STCP | IC_74XX595_SHCP);
	__low(P1OUT, IC_74XX595_DATA | IC_74XX595_STCP | IC_74XX595_SHCP);

	__high(P1DIR, SSD1289_RS | SSD1289_WR | SSD1289_RD | SSD1289_CS);
	__high(P1OUT, SSD1289_RS | SSD1289_WR | SSD1289_RD | SSD1289_CS);
}
Ejemplo n.º 2
0
static inline uint8_t _nokia1100_char_designer(const col_t i, const row_t j, const uint8_t k)
{
	register uint8_t send, tmp;
	
	/* design the char */
	send = font_simple_get(nokia1100_buffer[i][j].data, k);
	
	if(vt100_rowprop[i].double_height)
	{
		if(vt100_rowprop[i].double_height_pos)
		{
			tmp = send;
			send = 0x00;
			if(__read(tmp,BIT3))
			{
				__high(send, BIT7|BIT6);
			}
			
			if(__read(tmp,BIT2))
			{
				__high(send, BIT5|BIT4);
			}
			
			if(__read(tmp,BIT1))
			{
				__high(send, BIT3|BIT2);
			}
			
			if(__read(tmp,BIT0))
			{
				__high(send, BIT1|BIT0);
			}
		}
		else
		{
			tmp = send;
			send = 0x00;
			
			if(__read(tmp,BIT4))
			{
				__high(send, BIT1|BIT0);
			}
			
			if(__read(tmp,BIT5))
			{
				__high(send, BIT3|BIT2);
			}
			
			if(__read(tmp,BIT6))
			{
				__high(send, BIT5|BIT4);
			}
			
			if(__read(tmp,BIT7))
			{
				__high(send, BIT7|BIT6);
			}
		}
	}
	
	if(nokia1100_buffer[i][j].prop.underline)
	{
		send |= 0x80;
	}
	
	if(nokia1100_buffer[i][j].prop.invert)
	{
		send ^= 0xFF;
	}
	
	if(j == vt100_cursor.col
		&& setting.bits.CURSOR_STATE 
		&& i == vt100_cursor.row)
	{
		send ^= parm_setting.bits.CURSOR ? 0xFF : 0x80;
	}
	
	return send;
}