本文整理汇总了C++中RAM函数的典型用法代码示例。如果您正苦于以下问题:C++ RAM函数的具体用法?C++ RAM怎么用?C++ RAM使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了RAM函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: xad
INLINE void xad(void)
{
UINT8 addr = ROM(PC++) & 0x3f;
UINT8 t = A;
A = RAM(addr);
RAM(addr) = t;
}
开发者ID:broftkd,项目名称:historic-mess,代码行数:7,代码来源:410ops.c
示例2: X
INLINE void X(UINT8 r)
{
UINT8 t = RAM(B);
RAM(B) = A;
A = t;
B = B ^ (r << 4);
}
开发者ID:broftkd,项目名称:historic-mess,代码行数:7,代码来源:410ops.c
示例3: Processing_CalculateMeasures
void Processing_CalculateMeasures(void)
{
if(!set.measures.show || !isSet)
{
return;
}
int length = NumBytesInChannel(&ds);
// Вначале выделим память для данных из внешнего ОЗУ
dataInA = malloc(length);
dataInB = malloc(length);
// Вначале перепишем данные из внешнего ОЗУ
RAM_MemCpy16(RAM(PS_DATA_IN_A), dataInA, length);
RAM_MemCpy16(RAM(PS_DATA_IN_B), dataInB, length);
maxIsCalculating[0] = maxIsCalculating[1] = maxSteadyIsCalculating[0] = maxSteadyIsCalculating[1] = false;
minIsCalculating[0] = minIsCalculating[1] = minSteadyIsCalculating[0] = minSteadyIsCalculating[1] = false;
aveIsCalculating[0] = aveIsCalculating[1] = false;
periodIsCaclulating[0] = periodIsCaclulating[1] = false;
periodAccurateIsCalculating[0] = periodAccurateIsCalculating[1] = false;
picIsCalculating[0] = picIsCalculating[1] = false;
for(int str = 0; str < Measure_NumRows(); str++)
{
for(int elem = 0; elem < Measure_NumCols(); elem++)
{
Measure meas = Measure_Type(str, elem);
if (meas == Measure_TimeNarastaniya)
{
meas = meas;
}
pFuncFU8 func = measures[meas].FuncCalculate;
if(func)
{
if(meas == set.measures.markedMeasure || set.measures.markedMeasure == Measure_None)
{
markerVert[A][0] = markerVert[A][1] = markerVert[B][0] = markerVert[B][1] = ERROR_VALUE_INT;
markerHor[A][0] = markerHor[A][1] = markerHor[B][0] = markerHor[B][1] = ERROR_VALUE_INT;
}
if(set.measures.source == A || set.measures.source == A_B)
{
values[meas].value[A] = func(A);
}
if(set.measures.source == B || set.measures.source == A_B)
{
values[meas].value[B] = func(B);
}
}
}
}
// Теперь удалим выделенную память
free(dataInA);
free(dataInB);
}
开发者ID:Sasha7b9,项目名称:Osci,代码行数:57,代码来源:ProcessingSignal.c
示例4: XIS
INLINE void XIS(UINT8 r)
{
UINT8 t, Bd, Br;
t = RAM(B);
RAM(B) = A;
A = t;
Br = (UINT8)((B & 0x30) ^ (r << 4));
Bd = (UINT8)((B & 0x0F) + 1);
B = (UINT8)(Br | (Bd & 0x0F));
if (Bd == 0x10) skip = 1;
}
开发者ID:broftkd,项目名称:historic-mess,代码行数:14,代码来源:410ops.c
示例5: XDS
INLINE void XDS(UINT8 r)
{
UINT8 t, Bd, Br;
t = RAM(B);
RAM(B) = A;
A = t & 0xF;
Br = (UINT8)((B & 0x30) ^ (r << 4));
Bd = (UINT8)((B & 0x0F) - 1);
B = (UINT8)(Br | (Bd & 0x0F));
if (Bd == 0xFF) skip = 1;
}
开发者ID:tomlogic,项目名称:pinmame,代码行数:14,代码来源:410ops.c
示例6: Z80
void c80_state::c80(machine_config &config)
{
/* basic machine hardware */
Z80(config, m_maincpu, 2500000); /* U880D */
m_maincpu->set_addrmap(AS_PROGRAM, &c80_state::c80_mem);
m_maincpu->set_addrmap(AS_IO, &c80_state::c80_io);
m_maincpu->set_daisy_config(c80_daisy_chain);
/* video hardware */
config.set_default_layout(layout_c80);
/* devices */
Z80PIO(config, m_pio1, 2500000);
m_pio1->out_int_callback().set_inputline(m_maincpu, INPUT_LINE_IRQ0);
m_pio1->in_pa_callback().set(FUNC(c80_state::pio1_pa_r));
m_pio1->out_pa_callback().set(FUNC(c80_state::pio1_pa_w));
m_pio1->out_pb_callback().set(FUNC(c80_state::pio1_pb_w));
m_pio1->out_brdy_callback().set(FUNC(c80_state::pio1_brdy_w));
z80pio_device& pio2(Z80PIO(config, Z80PIO2_TAG, XTAL(2500000)));
pio2.out_int_callback().set_inputline(m_maincpu, INPUT_LINE_IRQ0);
CASSETTE(config, m_cassette);
m_cassette->set_default_state(CASSETTE_STOPPED | CASSETTE_MOTOR_ENABLED | CASSETTE_SPEAKER_ENABLED);
SPEAKER(config, "mono").front_center();
WAVE(config, "wave", m_cassette).add_route(ALL_OUTPUTS, "mono", 0.25);
/* internal ram */
RAM(config, RAM_TAG).set_default_size("1K");
}
开发者ID:PugsyMAME,项目名称:mame,代码行数:31,代码来源:c80.cpp
示例7: M6800
void jupiter2_state::jupiter2(machine_config &config)
{
// basic machine hardware
M6800(config, m_maincpu, 2000000);
m_maincpu->set_addrmap(AS_PROGRAM, &jupiter2_state::jupiter2_mem);
// devices
FD1771(config, INS1771N1_TAG, 1000000);
FLOPPY_CONNECTOR(config, INS1771N1_TAG":0", jupiter_floppies, "525ssdd", floppy_image_device::default_floppy_formats);
FLOPPY_CONNECTOR(config, INS1771N1_TAG":1", jupiter_floppies, nullptr, floppy_image_device::default_floppy_formats);
ACIA6850(config, m_acia0, XTAL(2'000'000)); // unknown frequency
m_acia0->txd_handler().set("serial0", FUNC(rs232_port_device::write_txd));
m_acia0->rts_handler().set("serial0", FUNC(rs232_port_device::write_rts));
rs232_port_device &serial0(RS232_PORT(config, "serial0", default_rs232_devices, "terminal"));
serial0.rxd_handler().set(m_acia0, FUNC(acia6850_device::write_rxd));
serial0.cts_handler().set(m_acia0, FUNC(acia6850_device::write_cts));
ACIA6850(config, m_acia1, XTAL(2'000'000)); // unknown frequency
m_acia1->txd_handler().set("serial1", FUNC(rs232_port_device::write_txd));
m_acia1->rts_handler().set("serial1", FUNC(rs232_port_device::write_rts));
rs232_port_device &serial1(RS232_PORT(config, "serial1", default_rs232_devices, "terminal"));
serial1.rxd_handler().set(m_acia1, FUNC(acia6850_device::write_rxd));
serial1.cts_handler().set(m_acia1, FUNC(acia6850_device::write_cts));
// internal ram
RAM(config, RAM_TAG).set_default_size("64K");
}
开发者ID:MASHinfo,项目名称:mame,代码行数:30,代码来源:jupiter.cpp
示例8: gdisp_lld_flush
LLDSPEC void gdisp_lld_flush(GDisplay *g) {
uint8_t * ram;
unsigned pages;
// Don't flush if we don't need it.
if (!(g->flags & GDISP_FLG_NEEDFLUSH))
return;
ram = RAM(g);
pages = GDISP_SCREEN_HEIGHT/8;
acquire_bus(g);
write_cmd(g, SSD1306_SETSTARTLINE | 0);
while (pages--) {
#if SSD1306_SH1106
write_cmd(g, SSD1306_PAM_PAGE_START + (7 - pages));
write_cmd(g, SSD1306_SETLOWCOLUMN + 2);
write_cmd(g, SSD1306_SETHIGHCOLUMN);
#endif
write_data(g, ram, SSD1306_PAGE_WIDTH);
ram += SSD1306_PAGE_WIDTH;
}
release_bus(g);
g->flags &= ~GDISP_FLG_NEEDFLUSH;
}
开发者ID:yusp75,项目名称:pellet-stove-control,代码行数:27,代码来源:gdisp_lld_SSD1306.c
示例9: Z80CTC
void newbrain_eim_device::device_add_mconfig(machine_config &config)
{
// devices
Z80CTC(config, m_ctc, XTAL(16'000'000)/8);
m_ctc->zc_callback<0>().set(m_acia, FUNC(acia6850_device::write_rxc));
m_ctc->zc_callback<1>().set(m_acia, FUNC(acia6850_device::write_txc));
m_ctc->zc_callback<2>().set(FUNC(newbrain_eim_device::ctc_z2_w));
TIMER(config, "z80ctc_c2").configure_periodic(FUNC(newbrain_eim_device::ctc_c2_tick), attotime::from_hz(XTAL(16'000'000)/4/13));
adc0809_device &adc(ADC0809(config, ADC0809_TAG, 500000));
adc.eoc_callback().set(FUNC(newbrain_eim_device::adc_eoc_w));
adc.in_callback<0>().set_constant(0);
adc.in_callback<1>().set_constant(0);
adc.in_callback<2>().set_constant(0);
adc.in_callback<3>().set_constant(0);
adc.in_callback<4>().set_constant(0);
adc.in_callback<5>().set_constant(0);
adc.in_callback<6>().set_constant(0);
adc.in_callback<7>().set_constant(0);
ACIA6850(config, m_acia, 0);
m_acia->irq_handler().set(FUNC(newbrain_eim_device::acia_interrupt));
RS232_PORT(config, RS232_TAG, default_rs232_devices, nullptr);
NEWBRAIN_EXPANSION_SLOT(config, m_exp, XTAL(16'000'000)/8, newbrain_expansion_cards, "fdc");
// internal ram
RAM(config, RAM_TAG).set_default_size("96K");
}
开发者ID:PugsyMAME,项目名称:mame,代码行数:31,代码来源:eim.cpp
示例10: Z80
ROM_END
//-------------------------------------------------
// device_add_mconfig - add device configuration
//-------------------------------------------------
void bbc_tube_zep100_device::device_add_mconfig(machine_config &config)
{
Z80(config, m_z80, 4_MHz_XTAL);
m_z80->set_addrmap(AS_PROGRAM, &bbc_tube_zep100_device::tube_zep100_mem);
m_z80->set_addrmap(AS_IO, &bbc_tube_zep100_device::tube_zep100_io);
VIA6522(config, m_via, 4_MHz_XTAL / 2);
m_via->writepb_handler().set(FUNC(bbc_tube_zep100_device::via_pb_w));
m_via->cb2_handler().set(m_ppi, FUNC(i8255_device::pc2_w));
m_via->ca2_handler().set(m_ppi, FUNC(i8255_device::pc6_w));
m_via->irq_handler().set(DEVICE_SELF_OWNER, FUNC(bbc_tube_slot_device::irq_w));
I8255A(config, m_ppi, 0);
m_ppi->out_pa_callback().set(m_via, FUNC(via6522_device::write_pa));
m_ppi->in_pb_callback().set(FUNC(bbc_tube_zep100_device::ppi_pb_r));
m_ppi->out_pc_callback().set(FUNC(bbc_tube_zep100_device::ppi_pc_w));
/* internal ram */
RAM(config, m_ram).set_default_size("64K").set_default_value(0x00);
/* software lists */
SOFTWARE_LIST(config, "flop_ls_torch").set_type("bbc_flop_torch", SOFTWARE_LIST_ORIGINAL_SYSTEM).set_filter("Z80");
}
开发者ID:MoochMcGee,项目名称:mame,代码行数:29,代码来源:tube_zep100.cpp
示例11: Z80
void z80ne_state::z80ne(machine_config &config)
{
/* basic machine hardware */
Z80(config, m_maincpu, Z80NE_CPU_SPEED_HZ);
m_maincpu->set_addrmap(AS_PROGRAM, &z80ne_state::z80ne_mem);
m_maincpu->set_addrmap(AS_IO, &z80ne_state::z80ne_io);
MCFG_MACHINE_START_OVERRIDE(z80ne_state,z80ne)
MCFG_MACHINE_RESET_OVERRIDE(z80ne_state,z80ne)
AY31015(config, m_uart);
CLOCK(config, m_uart_clock, 4800);
m_uart_clock->signal_handler().set(FUNC(z80ne_state::lx385_uart_tx_clock_w));
m_uart_clock->signal_handler().append(m_uart, FUNC(ay31015_device::write_rcp));
CASSETTE(config, m_cassette1);
m_cassette1->set_default_state(CASSETTE_STOPPED | CASSETTE_MOTOR_ENABLED | CASSETTE_SPEAKER_ENABLED);
m_cassette1->set_interface("z80ne_cass");
CASSETTE(config, m_cassette2);
m_cassette2->set_default_state(CASSETTE_STOPPED | CASSETTE_MOTOR_ENABLED | CASSETTE_SPEAKER_ENABLED);
m_cassette2->set_interface("z80ne_cass");
config.set_default_layout(layout_z80ne);
/* internal ram */
RAM(config, m_ram).set_default_size("32K");
// all known tapes require LX.388 expansion
//SOFTWARE_LIST(config, "cass_list").set_original("z80ne_cass");
}
开发者ID:SailorSat,项目名称:cabmame,代码行数:32,代码来源:z80ne.cpp
示例12: Z80
void newbrain_state::newbrain(machine_config &config)
{
// basic system hardware
Z80(config, m_maincpu, XTAL(16'000'000)/4);
m_maincpu->set_addrmap(AS_PROGRAM, &newbrain_state::newbrain_mreq);
m_maincpu->set_addrmap(AS_IO, &newbrain_state::newbrain_iorq);
COP420(config, m_cop, XTAL(16'000'000)/4);
m_cop->set_config(COP400_CKI_DIVISOR_16, COP400_CKO_OSCILLATOR_OUTPUT, true);
m_cop->read_g().set(FUNC(newbrain_state::cop_g_r));
m_cop->write_g().set(FUNC(newbrain_state::cop_g_w));
m_cop->write_d().set(FUNC(newbrain_state::cop_d_w));
m_cop->read_in().set(FUNC(newbrain_state::cop_in_r));
m_cop->write_so().set(FUNC(newbrain_state::k1_w));
m_cop->write_sk().set(FUNC(newbrain_state::k2_w));
m_cop->read_si().set(FUNC(newbrain_state::tdi_r));
// video hardware
newbrain_video(config);
// devices
NEWBRAIN_EXPANSION_SLOT(config, m_exp, XTAL(16'000'000)/4, newbrain_expansion_cards, "eim");
CASSETTE(config, m_cassette1);
m_cassette1->set_default_state((cassette_state)(CASSETTE_STOPPED | CASSETTE_MOTOR_DISABLED | CASSETTE_SPEAKER_MUTED));
CASSETTE(config, m_cassette2);
m_cassette2->set_default_state((cassette_state)(CASSETTE_STOPPED | CASSETTE_MOTOR_DISABLED | CASSETTE_SPEAKER_MUTED));
RS232_PORT(config, RS232_V24_TAG, default_rs232_devices, nullptr);
RS232_PORT(config, RS232_PRN_TAG, default_rs232_devices, nullptr);
// internal ram
RAM(config, RAM_TAG).set_default_size("32K");
}
开发者ID:PugsyMAME,项目名称:mame,代码行数:35,代码来源:newbrain.cpp
示例13: I8085A
void exp85_state::exp85(machine_config &config)
{
/* basic machine hardware */
I8085A(config, m_maincpu, 6.144_MHz_XTAL);
m_maincpu->set_addrmap(AS_PROGRAM, &exp85_state::exp85_mem);
m_maincpu->set_addrmap(AS_IO, &exp85_state::exp85_io);
m_maincpu->in_sid_func().set(FUNC(exp85_state::sid_r));
m_maincpu->out_sod_func().set(FUNC(exp85_state::sod_w));
/* sound hardware */
SPEAKER(config, "mono").front_center();
SPEAKER_SOUND(config, m_speaker).add_route(ALL_OUTPUTS, "mono", 0.25);
/* devices */
I8155(config, I8155_TAG, 6.144_MHz_XTAL/2);
i8355_device &i8355(I8355(config, I8355_TAG, 6.144_MHz_XTAL/2));
i8355.in_pa().set(FUNC(exp85_state::i8355_a_r));
i8355.out_pa().set(FUNC(exp85_state::i8355_a_w));
CASSETTE(config, m_cassette);
m_cassette->set_default_state((cassette_state)(CASSETTE_STOPPED | CASSETTE_MOTOR_ENABLED | CASSETTE_SPEAKER_MUTED));
RS232_PORT(config, "rs232", default_rs232_devices, "terminal").set_option_device_input_defaults("terminal", DEVICE_INPUT_DEFAULTS_NAME(terminal));
/* internal ram */
RAM(config, RAM_TAG).set_default_size("256").set_extra_options("4K");
}
开发者ID:Octocontrabass,项目名称:mame,代码行数:28,代码来源:exp85.cpp
示例14: base
void goupil_g2_state::goupil_g2(machine_config &config)
{
base(config);
m_maincpu->set_addrmap(AS_PROGRAM, &goupil_g2_state::mem);
// "visu 24x80" board
RAM(config, m_visu24x80_ram);
m_visu24x80_ram->set_default_size("2K"); // visu24x80 2K ram
m_screen->set_screen_update("crtc", FUNC(mc6845_device::screen_update));
m_screen->set_size((80*8), (24*(8+4)));
m_screen->set_visarea(0, (80*8)-1, 0, (24*(8+4))-1);
PALETTE(config, m_palette, 3);
m_palette->set_init("palette", FUNC(palette_device::palette_init_monochrome_highlight));
mc6845_device &crtc(MC6845(config, "crtc", 14.318181_MHz_XTAL / 8));
crtc.set_show_border_area(false);
crtc.set_char_width(8);
crtc.set_update_row_callback(FUNC(goupil_g2_state::crtc_update_row), this);
crtc.set_on_update_addr_change_callback(FUNC(goupil_g2_state::crtc_update_addr_changed), this);
m_via_video->writepa_handler().set_nop();
m_via_video->writepb_handler().set_nop();
m_via_video->ca2_handler().set_nop();
}
开发者ID:Octocontrabass,项目名称:mame,代码行数:26,代码来源:goupil.cpp
示例15: M6502
INPUT_PORTS_END
void superga2_state::kuzmich(machine_config &config)
{
/* basic machine hardware */
M6502(config, m_maincpu, 1021800);
m_maincpu->set_addrmap(AS_PROGRAM, &superga2_state::kuzmich_map);
APPLE2_VIDEO(config, m_video, XTAL(14'318'181));
APPLE2_COMMON(config, m_a2common, XTAL(14'318'181));
SCREEN(config, m_screen, SCREEN_TYPE_RASTER);
m_screen->set_raw(1021800*14, (65*7)*2, 0, (40*7)*2, 262, 0, 192);
m_screen->set_screen_update(FUNC(superga2_state::screen_update));
m_screen->set_palette(m_video);
/* sound hardware */
SPEAKER(config, "mono").front_center();
SPEAKER_SOUND(config, A2_SPEAKER_TAG).add_route(ALL_OUTPUTS, "mono", 1.00);
/* soft switches */
F9334(config, m_softlatch); // F14 (labeled 74LS259 on some boards and in the Apple ][ Reference Manual)
m_softlatch->q_out_cb<0>().set(FUNC(superga2_state::txt_w));
m_softlatch->q_out_cb<1>().set(FUNC(superga2_state::mix_w));
m_softlatch->q_out_cb<2>().set(FUNC(superga2_state::scr_w));
m_softlatch->q_out_cb<3>().set(FUNC(superga2_state::res_w));
m_softlatch->q_out_cb<6>().set(FUNC(superga2_state::an2_w));
RAM(config, RAM_TAG).set_default_size("48K").set_default_value(0x00);
}
开发者ID:rfka01,项目名称:mame,代码行数:30,代码来源:superga2.cpp
示例16: I8088
DEVICE_INPUT_DEFAULTS_END
void genpc_state::pcmda(machine_config &config)
{
/* basic machine hardware */
I8088(config, m_maincpu, 4772720);
m_maincpu->set_addrmap(AS_PROGRAM, &genpc_state::pc8_map);
m_maincpu->set_addrmap(AS_IO, &genpc_state::pc8_io);
m_maincpu->set_irq_acknowledge_callback("mb:pic8259", FUNC(pic8259_device::inta_cb));
IBM5160_MOTHERBOARD(config, "mb", 0).set_cputag(m_maincpu);
ISA8_SLOT(config, "isa1", 0, "mb:isa", pc_isa8_cards, "mda", false); // FIXME: determine ISA bus clock
ISA8_SLOT(config, "isa2", 0, "mb:isa", pc_isa8_cards, "com", false);
ISA8_SLOT(config, "isa3", 0, "mb:isa", pc_isa8_cards, "fdc_xt", false);
ISA8_SLOT(config, "isa4", 0, "mb:isa", pc_isa8_cards, "hdc", false);
ISA8_SLOT(config, "isa5", 0, "mb:isa", pc_isa8_cards, "adlib", false);
ISA8_SLOT(config, "isa6", 0, "mb:isa", pc_isa8_cards, nullptr, false);
/* keyboard */
PC_KBDC_SLOT(config, "kbd", pc_xt_keyboards, STR_KBD_IBM_PC_XT_83).set_pc_kbdc_slot(subdevice("mb:pc_kbdc"));
/* internal ram */
RAM(config, RAM_TAG).set_default_size("640K").set_extra_options("64K, 128K, 256K, 512K");
/* software lists */
SOFTWARE_LIST(config, "disk_list").set_original("ibm5150");
}
开发者ID:SailorSat,项目名称:cabmame,代码行数:28,代码来源:genpc.cpp
示例17: STII
INLINE void STII(UINT8 y)
{
UINT16 Bd;
RAM(B) = y;
Bd = (B & 0x0f) + 1;
if (Bd > 15) Bd = 0;
B = (B & 0x30) + Bd;
}
开发者ID:broftkd,项目名称:historic-mess,代码行数:9,代码来源:410ops.c
示例18: spectrum_common
void spectrum_state::spectrum(machine_config &config)
{
spectrum_common(config);
/* internal ram */
RAM(config, m_ram).set_default_size("48K").set_extra_options("16K").set_default_value(0xff);
// This configuration is verified only for the original ZX Spectrum.
// It's likely, but still to be checked, that many clones were produced only
// in the 48k configuration, while others have extra memory (80k, 128K, 1024K)
// available via bankswitching.
}
开发者ID:fesh0r,项目名称:mame-full,代码行数:11,代码来源:spectrum.cpp
示例19: M68000
void bitgraph_state::bitgrphb(machine_config &config)
{
M68000(config, m_maincpu, XTAL(6'900'000));
m_maincpu->set_addrmap(AS_PROGRAM, &bitgraph_state::bitgraphb_mem);
bg_motherboard(config);
// bg_ppu(config);
CLOCK(config, "system_clock", 1040).signal_handler().set(FUNC(bitgraph_state::system_clock_write));
RAM(config, RAM_TAG).set_default_size("512K");
}
开发者ID:fesh0r,项目名称:mame-full,代码行数:12,代码来源:bitgraph.cpp
示例20: gdisp_lld_fill_area
LLDSPEC void gdisp_lld_fill_area(GDisplay *g) {
coord_t sy, ey;
coord_t sx, ex;
coord_t col;
unsigned spage, zpages;
uint8_t * base;
uint8_t mask;
switch(g->g.Orientation) {
default:
case GDISP_ROTATE_0:
sx = g->p.x;
ex = g->p.x + g->p.cx - 1;
sy = g->p.y;
ey = sy + g->p.cy - 1;
break;
case GDISP_ROTATE_90:
sx = g->p.y;
ex = g->p.y + g->p.cy - 1;
sy = GDISP_SCREEN_HEIGHT - g->p.x - g->p.cx;
ey = GDISP_SCREEN_HEIGHT-1 - g->p.x;
break;
case GDISP_ROTATE_180:
sx = GDISP_SCREEN_WIDTH - g->p.x - g->p.cx;
ex = GDISP_SCREEN_WIDTH-1 - g->p.x;
sy = GDISP_SCREEN_HEIGHT - g->p.y - g->p.cy;
ey = GDISP_SCREEN_HEIGHT-1 - g->p.y;
break;
case GDISP_ROTATE_270:
sx = GDISP_SCREEN_WIDTH - g->p.y - g->p.cy;
ex = GDISP_SCREEN_WIDTH-1 - g->p.y;
sy = g->p.x;
ey = g->p.x + g->p.cx - 1;
break;
}
spage = sy / 8;
base = RAM(g) + SSD1306_PAGE_OFFSET + SSD1306_PAGE_WIDTH * spage;
mask = 0xff << (sy&7);
zpages = (ey / 8) - spage;
if (gdispColor2Native(g->p.color) == gdispColor2Native(Black)) {
while (zpages--) {
for (col = sx; col <= ex; col++)
base[col] &= ~mask;
mask = 0xff;
base += SSD1306_PAGE_WIDTH;
}
mask &= (0xff >> (7 - (ey&7)));
for (col = sx; col <= ex; col++)
base[col] &= ~mask;
} else {
while (zpages--) {
开发者ID:yusp75,项目名称:pellet-stove-control,代码行数:53,代码来源:gdisp_lld_SSD1306.c
注:本文中的RAM函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论