Ejemplo n.º 1
0
int adsi_channel_restore(struct ast_channel *chan)
{
	char dsp[256];
	int bytes;
	int x;
	unsigned char keyd[6];

	memset(dsp, 0, sizeof(dsp));

	/* Start with initial display setup */
	bytes = 0;
	bytes += adsi_set_line(dsp + bytes, ADSI_INFO_PAGE, 1);

	/* Prepare key setup messages */

	if (speeds) {
		memset(keyd, 0, sizeof(keyd));
		for (x=0;x<speeds;x++) {
			keyd[x] = ADSI_SPEED_DIAL + x;
		}
		bytes += adsi_set_keys(dsp + bytes, keyd);
	}
	adsi_transmit_message(chan, dsp, bytes, ADSI_MSG_DISPLAY);
	return 0;

}
Ejemplo n.º 2
0
static int adsi_channel_restore(struct ast_channel *chan)
{
	unsigned char dsp[256] = "", keyd[6] = "";
	int bytes, x;

	/* Start with initial display setup */
	bytes = 0;
	bytes += adsi_set_line(dsp + bytes, ADSI_INFO_PAGE, 1);

	/* Prepare key setup messages */

	if (speeds) {
		for (x = 0; x < speeds; x++) {
			keyd[x] = ADSI_SPEED_DIAL + x;
		}
		bytes += adsi_set_keys(dsp + bytes, keyd);
	}
	adsi_transmit_message_full(chan, dsp, bytes, ADSI_MSG_DISPLAY, 0);
	return 0;

}