Subversion Repositories group.electronics

Rev

Rev 126 | Blame | Compare with Previous | Last modification | View Log | RSS feed

/*
 * lmd.h
 *
 *  Created on: 30/11/2013
 *      Author: pfowler
 */

#ifndef LMD_H_
#define LMD_H_

struct {
        uint8_t pin;
        uint8_t ddr;
        uint8_t port;
        uint8_t clk;
        uint8_t load;
        uint8_t data;
        uint8_t numMax;
        uint8_t* dps;

} lmd;

void lmd_init(uint8_t pinx_addr, uint8_t clk_pin, uint8_t load_pin, uint8_t data_pin, uint8_t numMax);

void lmd_dp(uint8_t max, uint8_t);

void lmd_print_u32(uint8_t max, uint32_t value);
void lmd_print_u16(uint8_t max, uint16_t value);
void lmd_print_u8(uint8_t max, uint8_t value);

void lmd_intensity(uint8_t max, uint8_t i);
void lmd_scanlimit(uint8_t max, uint8_t l);
void lmd_shutdown(uint8_t max, uint8_t s);
void lmd_decodemode(uint8_t max, uint8_t d);


void lmd_writeReg(uint8_t max, uint8_t reg, uint8_t val);
void lmd_writeByte(uint8_t dataout);

void lmd_clearAll(void);
void lmd_writeRegAll(uint8_t reg, uint8_t val);

void lmd_test(void);

#endif /* LMD_H_ */