Exemplo n.º 1
0
static inline void ast_load_palette_index(struct ast_private *ast,
        u8 index, u8 red, u8 green,
        u8 blue)
{
    ast_io_write8(ast, AST_IO_DAC_INDEX_WRITE, index);
    ast_io_read8(ast, AST_IO_SEQ_PORT);
    ast_io_write8(ast, AST_IO_DAC_DATA, red);
    ast_io_read8(ast, AST_IO_SEQ_PORT);
    ast_io_write8(ast, AST_IO_DAC_DATA, green);
    ast_io_read8(ast, AST_IO_SEQ_PORT);
    ast_io_write8(ast, AST_IO_DAC_DATA, blue);
    ast_io_read8(ast, AST_IO_SEQ_PORT);
}
Exemplo n.º 2
0
uint8_t ast_get_index_reg_mask(struct ast_private *ast,
			       uint32_t base, uint8_t index, uint8_t mask)
{
	uint8_t ret;
	ast_io_write8(ast, base, index);
	ret = ast_io_read8(ast, base + 1) & mask;
	return ret;
}
Exemplo n.º 3
0
void ast_set_index_reg_mask(struct ast_private *ast,
			    uint32_t base, uint8_t index,
			    uint8_t mask, uint8_t val)
{
	u8 tmp;
	ast_io_write8(ast, base, index);
	tmp = (ast_io_read8(ast, base + 1) & mask) | val;
	ast_set_index_reg(ast, base, index, tmp);
}