本文整理汇总了C++中wr函数的典型用法代码示例。如果您正苦于以下问题:C++ wr函数的具体用法?C++ wr怎么用?C++ wr使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了wr函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: fimg2d4x_set_src_image
void fimg2d4x_set_src_image(struct fimg2d_control *info, struct fimg2d_image *s)
{
unsigned long cfg;
wr(FIMG2D_ADDR(s->addr.start), FIMG2D_SRC_BASE_ADDR_REG);
wr(FIMG2D_STRIDE(s->stride), FIMG2D_SRC_STRIDE_REG);
if (s->order < ARGB_ORDER_END) { /* argb */
cfg = s->order << FIMG2D_RGB_ORDER_SHIFT;
if (s->fmt == CF_A8)
wr(a8_rgbcolor, FIMG2D_SRC_A8_RGB_EXT_REG);
} else if (s->order < P1_ORDER_END) { /* YCbC1 1plane */
cfg = (s->order - P1_CRY1CBY0) << FIMG2D_YCBCR_ORDER_SHIFT;
} else { /* YCbCr 2plane */
cfg = (s->order - P2_CRCB) << FIMG2D_YCBCR_ORDER_SHIFT;
cfg |= FIMG2D_YCBCR_2PLANE;
wr(FIMG2D_ADDR(s->plane2.start),
FIMG2D_SRC_PLANE2_BASE_ADDR_REG);
}
cfg |= s->fmt << FIMG2D_COLOR_FORMAT_SHIFT;
wr(cfg, FIMG2D_SRC_COLOR_MODE_REG);
}
示例2: dmtcp_ProcessInfo_ProcessEvent
void dmtcp_ProcessInfo_ProcessEvent(DmtcpEvent_t event, DmtcpEventData_t *data)
{
switch (event) {
case DMTCP_EVENT_PRE_EXEC:
{
jalib::JBinarySerializeWriterRaw wr("", data->serializerInfo.fd);
dmtcp::ProcessInfo::instance().serialize(wr);
}
break;
case DMTCP_EVENT_POST_EXEC:
{
jalib::JBinarySerializeReaderRaw rd("", data->serializerInfo.fd);
dmtcp::ProcessInfo::instance().serialize(rd);
dmtcp::ProcessInfo::instance().postExec();
}
break;
case DMTCP_EVENT_WRITE_CKPT_PREFIX:
{
jalib::JBinarySerializeWriterRaw wr("", data->serializerInfo.fd);
dmtcp::ProcessInfo::instance().serialize(wr);
}
break;
default:
break;
}
}
示例3: fimg2d4x_set_dst_image
/**
* @d: set base address, stride, color format, order
*/
void fimg2d4x_set_dst_image(struct fimg2d_control *info, struct fimg2d_image *d)
{
unsigned long cfg;
wr(FIMG2D_ADDR(d->addr.start), FIMG2D_DST_BASE_ADDR_REG);
wr(FIMG2D_STRIDE(d->stride), FIMG2D_DST_STRIDE_REG);
if (d->order < ARGB_ORDER_END) {
cfg = d->order << FIMG2D_RGB_ORDER_SHIFT;
if (d->fmt == CF_A8)
wr(a8_rgbcolor, FIMG2D_DST_A8_RGB_EXT_REG);
} else if (d->order < P1_ORDER_END) {
cfg = (d->order - P1_CRY1CBY0) << FIMG2D_YCBCR_ORDER_SHIFT;
} else {
cfg = (d->order - P2_CRCB) << FIMG2D_YCBCR_ORDER_SHIFT;
cfg |= FIMG2D_YCBCR_2PLANE;
wr(FIMG2D_ADDR(d->plane2.start),
FIMG2D_DST_PLANE2_BASE_ADDR_REG);
}
cfg |= d->fmt << FIMG2D_COLOR_FORMAT_SHIFT;
wr(cfg, FIMG2D_DST_COLOR_MODE_REG);
}
示例4: dib3000mb_tuner_pass_ctrl
static int dib3000mb_tuner_pass_ctrl(struct dvb_frontend *fe, int onoff, u8 pll_addr)
{
struct dib3000_state *state = fe->demodulator_priv;
if (onoff) {
wr(DIB3000MB_REG_TUNER, DIB3000_TUNER_WRITE_ENABLE(pll_addr));
} else {
wr(DIB3000MB_REG_TUNER, DIB3000_TUNER_WRITE_DISABLE(pll_addr));
}
return 0;
}
示例5: miiwr
static void
miiwr(Dev *d, int idx, int val)
{
while(rr(d, MIIaddr) & MIIbusy)
;
wr(d, MIIdata, val);
wr(d, MIIaddr, PHYinternal<<11 | idx<<6 | MIIwrite);
while(rr(d, MIIaddr) & MIIbusy)
;
}
示例6: fimg2d4x_set_color_fill
/**
* If solid color fill is enabled, other blit command is ignored.
* Color format of solid color is considered to be
* the same as destination color format
* Channel order of solid color is A-R-G-B or Y-Cb-Cr
*/
void fimg2d4x_set_color_fill(struct fimg2d_control *info, unsigned long color)
{
wr(FIMG2D_SOLID_FILL, FIMG2D_BITBLT_COMMAND_REG);
/* sf color */
wr(color, FIMG2D_SF_COLOR_REG);
/* set 16 burst for performance */
fimg2d4x_set_max_burst_length(info, MAX_BURST_16);
}
示例7: dib3000mb_fifo_control
static int dib3000mb_fifo_control(struct dvb_frontend *fe, int onoff)
{
struct dib3000_state *state = fe->demodulator_priv;
deb_xfer("%s fifo\n",onoff ? "enabling" : "disabling");
if (onoff) {
wr(DIB3000MB_REG_FIFO, DIB3000MB_FIFO_ACTIVATE);
} else {
wr(DIB3000MB_REG_FIFO, DIB3000MB_FIFO_INHIBIT);
}
return 0;
}
示例8: fimg2d4x_set_rotation
void fimg2d4x_set_rotation(struct fimg2d_control *info, enum rotation rot)
{
int rev_rot90; /* counter clockwise, 4.1 specific */
unsigned long cfg;
enum addressing dirx, diry;
rev_rot90 = 0;
dirx = diry = FORWARD_ADDRESSING;
switch (rot) {
case ROT_90: /* -270 degree */
rev_rot90 = 1; /* fall through */
case ROT_180:
dirx = REVERSE_ADDRESSING;
diry = REVERSE_ADDRESSING;
break;
case ROT_270: /* -90 degree */
rev_rot90 = 1;
break;
case XFLIP:
diry = REVERSE_ADDRESSING;
break;
case YFLIP:
dirx = REVERSE_ADDRESSING;
break;
case ORIGIN:
default:
break;
}
/* destination direction */
if (dirx == REVERSE_ADDRESSING || diry == REVERSE_ADDRESSING) {
cfg = rd(FIMG2D_DST_PAT_DIRECT_REG);
if (dirx == REVERSE_ADDRESSING)
cfg |= FIMG2D_DST_X_DIR_NEGATIVE;
if (diry == REVERSE_ADDRESSING)
cfg |= FIMG2D_DST_Y_DIR_NEGATIVE;
wr(cfg, FIMG2D_DST_PAT_DIRECT_REG);
}
/* rotation -90 */
if (rev_rot90) {
cfg = rd(FIMG2D_ROTATE_REG);
cfg |= FIMG2D_SRC_ROTATE_90;
cfg |= FIMG2D_MSK_ROTATE_90;
wr(cfg, FIMG2D_ROTATE_REG);
}
}
示例9: wrAnimations
void wrAnimations(char* file, int animationlength)
{
wr(file,0x144,animationlength);
wr(file,0x14c,0x00000020);
wr(file,0x150,0x00007fff);
wr(file,0x160,0x7F7FFFFF);
wr(file,0x164,0x7F7FFFFF);
wr(file,0x168,0x7F7FFFFF);
wr(file,0x16c,0xFF7FFFFF);
wr(file,0x170,0xFF7FFFFF);
wr(file,0x174,0xFF7FFFFF);
wr(file,0x17c,0x0000FFFF);
}
示例10: fimg2d4x_enable_clipping
/**
* @c: destination clipping region
*/
void fimg2d4x_enable_clipping(struct fimg2d_control *info,
struct fimg2d_clip *clp)
{
unsigned long cfg;
cfg = rd(FIMG2D_BITBLT_COMMAND_REG);
cfg |= FIMG2D_ENABLE_CW;
wr(cfg, FIMG2D_BITBLT_COMMAND_REG);
wr(FIMG2D_OFFSET(clp->x1, clp->y1), FIMG2D_CW_LT_REG);
wr(FIMG2D_OFFSET(clp->x2, clp->y2), FIMG2D_CW_RB_REG);
}
示例11: send
static void send(char buf,char len)
{
unsigned char i;
for(i = 0;i < len;i ++)
{
if(buf & 0x80)data(1);
else data(0);
wr(0);
delay();
wr(1);
delay();
buf <<= 1;
}
}
示例12: ofw_pci_dmamap_sync_stst_order_common
void
ofw_pci_dmamap_sync_stst_order_common(void)
{
static u_char buf[VIS_BLOCKSIZE] __aligned(VIS_BLOCKSIZE);
register_t reg, s;
s = intr_disable();
reg = rd(fprs);
wr(fprs, reg | FPRS_FEF, 0);
__asm __volatile("stda %%f0, [%0] %1"
: : "r" (buf), "n" (ASI_BLK_COMMIT_S));
membar(Sync);
wr(fprs, reg, 0);
intr_restore(s);
}
示例13: schur
bool schur(const mat &A, mat &U, mat &T)
{
it_assert_debug(A.rows() == A.cols(), "schur(): Matrix is not square");
char jobvs = 'V';
char sort = 'N';
int info;
int n = A.rows();
int lda = n;
int ldvs = n;
int lwork = 3 * n; // This may be choosen better!
int sdim = 0;
vec wr(n);
vec wi(n);
vec work(lwork);
T.set_size(lda, n, false);
U.set_size(ldvs, n, false);
T = A; // The routine overwrites input matrix with eigenvectors
dgees_(&jobvs, &sort, 0, &n, T._data(), &lda, &sdim, wr._data(), wi._data(),
U._data(), &ldvs, work._data(), &lwork, 0, &info);
return (info == 0);
}
示例14: paint_children
static void paint_children(QWidget * p,const QRegion& r, bool post)
{
if(!p)
return;
QObjectList * childObjects=(QObjectList*)p->children();
if(childObjects) {
QObject * o;
for(o=childObjects->first();o!=0;o=childObjects->next()) {
if( o->isWidgetType() ) {
QWidget *w = (QWidget *)o;
if ( w->testWState(Qt::WState_Visible) ) {
QRegion wr( QRegion(w->geometry()) & r );
if ( !wr.isEmpty() ) {
wr.translate(-w->x(),-w->y());
if ( post )
QApplication::postEvent(w,new QPaintEvent(wr,
!w->testWFlags(QWidget::WRepaintNoErase) ) );
else
w->repaint(wr, !w->testWFlags(QWidget::WRepaintNoErase));
paint_children(w,wr,post);
}
}
}
}
}
}
示例15: wr
QPixmap QPixmap::grabWidget( QWidget * widget, int x, int y, int w, int h )
{
QPixmap res;
if ( !widget )
return res;
if ( w < 0 )
w = widget->width() - x;
if ( h < 0 )
h = widget->height() - y;
QRect wr( x, y, w, h );
if ( wr == widget->rect() )
return grabChildWidgets( widget );
if ( !wr.intersects( widget->rect() ) )
return res;
res.resize( w, h );
if( res.isNull() )
return res;
res.fill( widget, QPoint( w,h ) );
QPixmap tmp( grabChildWidgets( widget ) );
if( tmp.isNull() )
return tmp;
::bitBlt( &res, 0, 0, &tmp, x, y, w, h );
return res;
}